-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to customize the AuthToken? #34
Comments
Easiest is to extend the authCode grant and swap the implementation in PassportServiceProvider. This is what I did when I used this library. I am also curious if you have an idea of a way to process additional claims without extending the class? |
@omitobi perfect! This worked! Or at least, I'm getting a different error back now. Firebase is now saying "Remote site returned 5xxx for oidc.mysite CODE_EXCHANGE". I'm going to dig through logs now, but based on this error do you any ideas what it is upset about now? |
I'm not entirely sure what could be the reason firebase is complaining but you could check for that specific error information online. |
I resolved the 5xx error - that was a silly mistake of mine. But Firebase continues to return 'Unable to parse the ID Token.' The only field that the Google SSO token has that mine is missing is Grrrrr! |
Using openidconnect.net I've compared the auth tokens issued by
laravel-openid-connect-server
and Google'a OAuth flow and Google returns userdata in the AuthToken. Compare:This Library
Header
Payload
Google
Header
Payload
As this format is accepted by Firebase (who I am trying to integrate with) I'd like to use this as a template and at least add the personal details to the token.
This library's routes file sends POST requests to
oauth/token
to Laravel Passport'sAccessTokenController::issueToken()
function which eventually uses theopenid-connect-server
AuthCodeGrant::respondToAccessTokenRequest()
function. I notice in that function there is a TODO on line 206 "populate idToken with claims ...". The associated next line calls out to a stub functionaddMoreClaimsToIdToken()
. Did you have a plan for this? Or should I extend theAuthCodeGrant
class to implement this in a custom class in Laravel to add these claims?Thanks
The text was updated successfully, but these errors were encountered: