Do not infer username from email
This commit is contained in:
parent
100f126405
commit
5a50f6223f
@ -917,7 +917,6 @@ func (p *OAuthProxy) GetJwtSession(req *http.Request) (*sessionsapi.SessionState
|
|||||||
if claims.Verified != nil && !*claims.Verified {
|
if claims.Verified != nil && !*claims.Verified {
|
||||||
return nil, fmt.Errorf("email in id_token (%s) isn't verified", claims.Email)
|
return nil, fmt.Errorf("email in id_token (%s) isn't verified", claims.Email)
|
||||||
}
|
}
|
||||||
user := strings.Split(claims.Email, "@")[0]
|
|
||||||
|
|
||||||
session = &sessionsapi.SessionState{
|
session = &sessionsapi.SessionState{
|
||||||
AccessToken: rawBearerToken,
|
AccessToken: rawBearerToken,
|
||||||
@ -925,7 +924,7 @@ func (p *OAuthProxy) GetJwtSession(req *http.Request) (*sessionsapi.SessionState
|
|||||||
RefreshToken: "",
|
RefreshToken: "",
|
||||||
ExpiresOn: bearerToken.Expiry,
|
ExpiresOn: bearerToken.Expiry,
|
||||||
Email: claims.Email,
|
Email: claims.Email,
|
||||||
User: user,
|
User: claims.Email,
|
||||||
}
|
}
|
||||||
return session, nil
|
return session, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user