You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-12-21 23:57:36 +02:00
adapting unit tests and fixing minor issues introduced with the derefing
Signed-off-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
@@ -41,7 +41,10 @@ func CreateTokenToSessionFunc(verify VerifyFunc) TokenToSessionFunc {
|
||||
claims.Email = claims.Subject
|
||||
}
|
||||
|
||||
if !ptr.Deref(claims.Verified, false) {
|
||||
// Ensure email is verified
|
||||
// If the email is not verified, return an error
|
||||
// If the email_verified claim is missing, assume it is verified
|
||||
if !ptr.Deref(claims.Verified, true) {
|
||||
return nil, fmt.Errorf("email in id_token (%s) isn't verified", claims.Email)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user