OpenID Connect
Notes on the OAuth-based standard for authentication and authorization
Overview
- Open standard layered on top of OAuth for identity management and single-sign-on
- Many social providers allow for authentication via this protocol
- Amazon
- Salesforce
- Authentication that is deeply integrated with Authorization, as permissions and profiles and such are passed through
OpenID Connect Flow (Steps)
Let’s go over what this looks like with an example application: Asana, but logging in with Google.
- User navigates to Asana
- User clicks Log In With Google
- User is forwarded directly to Google’s application (no longer in Asana at all)
- User authenticates with their Google Credentials
- User is asked to validate that Asana should have access to some of their information from Google
- Based on scopes, etc…
- User accepts and is forwarded back to Asana
- In the redirect, an auth code is passed back to Asana
- Asana takes the auth code and requests a token from Google
- Google returns back an Access Token & an ID Token
- ID Token is for identifying the user (authentication)
- Note: I’m still unsure what this is exactly used for. Where should it be stored in Asana’s DB?
- Access Token is for accessing Google Resources (authorization)
- ID Token is for identifying the user (authentication)
- Asana uses the Access Token to query Google for User Info
- Google responds to Asana with user information