Outils pour utilisateurs

Outils du site


informatique:oauth

Ceci est une ancienne révision du document !


OAuth

An open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications.

http://oauth.net/

Voir aussi : Single Sign-On

OAuth flows

Implicit flow

Image source https://blog.postman.com/pkce-oauth-how-to

Diagram source from postman.com.

Implicit flow n'est pas sécurisé car le token est passé dans l'url et peut donc être volé. Il faut donc éviter de l'utiliser ou au pire seulement pour accéder au profile de l'utilisateur identifié. Public clients such as native apps and JavaScript apps should now use the authorization code flow with the PKCE extension instead.

J'ai fait un PoC là: https://git.artefacts.coop/Cyrille37/sso-oauth-implicit-grant

Authorization code flow

Diagram source from postman.com.

Authorization code flow with PKCE

Proof Key for Code Exchange (PKCE).

OAuth 2.0: Implicit Flow is Dead, Try PKCE Instead

Diagram source from postman.com.

Comment API vérifie le Access Token ?

Providers

Twitter

Apple

Apple est moins couramment utilisé, peut être à cause de ses spécificités

To use Apple sign in, you need a client ID and client secret. You can get them from the Apple Developer Portal / Auth Keys.

LinkedIn

To access LinkedIn APIs, a developer app should be created in the LinkedIn’s developer page.

For Individual Developers: API products available to individual developers have a default Company page associated with them and you must select that default Company page to proceed.

Documentation :

API

Other tools:

  • OAuth2 Proxy A reverse proxy and static file server that provides authentication using Providers (Google, GitHub, and others) to validate accounts by email, domain or group with Nginx, Caddy or Traefik

PHP

Mobile & API

3 acteurs: l'App Mobile pour consommer, Le Site/API pour servir et le Fournisseur Tiers pour l'authentification.

On trouve des exemples avec Laravel Socialite pour le site et un package OAuth dans l'App mobile. Mais le site ne vérifie pas la validité du token fourni par l'App Mobile, qui l'a obtenue depuis le fournisseur tiers …

informatique/oauth.1756722370.txt.gz · Dernière modification : de cyrille

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki