You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an earlier version of this startegy, the verify callback had access to the claims. So we were able to acces some custom properties in the claim and apply them to the profile.
In the current version, claims is not passed in anymore.
A custom parse function seems to be the most elegnat solution for this requirement.
Please think about adding a custom parse function for the context too.
We are currently working arround this issue with a very uggly hack/workarround.
Overwrite the strategies private _shouldLoadUserProfile method, as it has access to claims.
Then remember claims as a property of request.
// HACK: sadly the basic impl doesn't pass the claims to openIDVerifyCallback anymorethis._shouldLoadUserProfile=(req,claims,done)=>{req['passport_'+this.name+"_claims"]=claims;done(null,false);}
In your verify callback, get the claims from the request. Must set passReqToCallback=true in the strategy options!
Im using
passport-openidconnect
with Authelia.With current implementation, only well defined list of UserInfo data (https://github.com/jaredhanson/passport-openidconnect/blob/master/lib/profile.js) can be passed to verify function.
It would be nice to be able pass additional parsing function from Strategy options.
It can work like this:
This way passport-openidconnect will allow users to parse any UserInfo. If this can be already achieved somehow, can you please clarify how?
(Sorry for my pure JS code example ;))
The text was updated successfully, but these errors were encountered: