deno-oauth2-client icon indicating copy to clipboard operation
deno-oauth2-client copied to clipboard

id_token support (OpenID)

Open zifeo opened this issue 2 years ago • 3 comments

Is there a particular reason for this library not to return the id_token when present aside the access and refresh token?

zifeo avatar Jun 11 '23 21:06 zifeo

I was also looking for the ID token today and found it was missing.

martpet avatar Jun 29 '23 07:06 martpet

Me too, so I've raised a PR ^

jollytoad avatar Jun 29 '23 10:06 jollytoad

Hi there! Sorry for the delay here, but as I wrote in #29 (unfortunately without linking back to this issue), I didn't originally intended for this module to be an OpenID Connect client.

Since then, I came to the conclusion that it would probably be best to open up the OAuth2 Grant classes to allow other classes to inherit from them and override or extend their functionality (as would be required for proper OIDC support). I've also started working on a more proper OIDC client that uses this mechanism to add spec-conformant handling of ID tokens, among other extensions that OIDC makes to the OAuth2 spec.

If you're interested in that, check out my latest comment in #29. Any feedback would be much appreciated!

cmd-johnson avatar Aug 02 '23 10:08 cmd-johnson