cmd-johnson / deno-oauth2-client

Minimalistic OAuth 2.0 client for Deno.
MIT License
45 stars 9 forks source link

id_token support (OpenID) #28

Open zifeo opened 1 year ago

zifeo commented 1 year ago

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

martpet commented 1 year ago

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

jollytoad commented 1 year ago

Me too, so I've raised a PR ^

cmd-johnson commented 1 year ago

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!