{"repo":"LukasNiessen/oidc-explained","free":true,"listed":false,"github":"https://github.com/LukasNiessen/oidc-explained","clone":"git clone https://github.com/LukasNiessen/oidc-explained.git","description":"OIDC explained with code snippet","language":"JavaScript","stars":40,"topics":["authentication","oauth","oauth2","oidc"],"license":null,"category":"auth-billing-email","readme_excerpt":"OIDC Explained Let's say John is on LinkedIn and clicks 'Login with Google '. He is now logged in without that LinkedIn knows his password or any other sensitive data. Great! But how did that work? Via OpenID Connect (OIDC). This protocol builds on OAuth 2.0 and is the answer to above question. I will provide a super short and simple summary, a more detailed one and even a code snippet. You should know what OAuth and JWTs are because OIDC builds on them. If you're not familiar with OAuth, see my other guide [here][ref oauth repo]. Super Short Summary - John clicks 'Login with Google ' - Now the usual OAuth process takes place - John authorizes us to get data about his Google profile - E.g. his email, profile picture, name and user id - Important : Now Google not only sends LinkedIn the access token as specified in OAuth, but also a JWT. - LinkedIn uses the JWT for authentication in the usual way - E.g. John's browser saves the JWT in the cookies and sends it along every request he makes - LinkedIn receives the token, verifies it, and sees \" ah, this is indeed John \" More Detailed Summary Suppose LinkedIn wants users to log in with their Google account to authenticate and retrieve profile info (e.g., name, email). 1. LinkedIn sets up a Google API account and receives a client id and a client secret - So Google knows this client id is LinkedIn 2. John clicks ' Log in with Google ' on LinkedIn. 3. LinkedIn redirects to Google’s OIDC authorization endpoint: https://accounts.googl","default_branch":null,"files":null,"tree":[],"storefront":"/r/LukasNiessen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/LukasNiessen/oidc-explained/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}