<div dir="ltr"><div>Hi,</div><div><br></div>I've a question regarding "hybrid" (browser + server) relying party scenarios in the context of the OIDC spec and I would like your opinion.<br><div><br></div><div><div>A common setting in modern apps, is for them to be composed by </div><div>- a rich javascript client </div><div>- a backend HTTP API</div><div>Both components typically access to the user's identity (e.g. for UI purposes or for access control purposes). Also common is the usage of external identity providers (e.g. Google accounts) to obtain elements of the user's identity.</div><div><br></div><div>A way to architect this in the context of OAuth 2.0 and OIDC would be to use an "intermediate" Authorization Server (AS), where:</div></div><div>- The AS delegates authentication to external identity providers, i.e., the AS would be the RP to the external IdPs.</div><div>- The browser-side app acts as the "client app" to the AS, and obtains access tokens and ID tokens from the AS (e.g. using the "hybrid flow"). Then, uses the access tokens when accessing the backend HTTP API.</div><div>- The backend HTTP API app acts as the Resource Server to the AS and uses the identity embed in the access token (as well as other authorisation information such as granted scopes).</div><div><br></div><div>However, I was wondering if we really need this "intermediate" Authorization Server. Namely. can't the browser-side app obtain ID tokens directly from the external IdP (e.g. Google accounts) and use this ID token to authenticate the user to the backend HTTP API. For instance, something like this:</div><div><br></div><div>browser-app --> IdP: OIDC authorisation request</div><div>browser-app <-> IdP: ... authentication and consent ...</div><div>browser-app <-- IdP: ID token</div><div>browser-app --> backend API: ID token</div><div>backend API validates the ID token, including the audience, and generates an access token</div><div>browser-app <-- backend API: access token</div><div>browser-app --> backend API: "application request" with access token as a Bearer token</div><div><br></div><div>Does this last design make sense? Namely, does this relate to RFC 7523?</div><div><br></div><div>A variant would be to use the ID token as an access token on all "application requests" done from the browser-app to the backend API, however this seems to go agains the semantics of ID tokens.</div><div><br></div><div>Thanks,</div><div>Pedro</div><div><br></div><div><br></div><div> </div></div>