Do not infer username from email

This commit is contained in:
Brian Van Klaveren 2019-06-17 12:58:40 -07:00
parent 100f126405
commit 5a50f6223f

View File

@ -917,7 +917,6 @@ func (p *OAuthProxy) GetJwtSession(req *http.Request) (*sessionsapi.SessionState
if claims.Verified != nil && !*claims.Verified {
return nil, fmt.Errorf("email in id_token (%s) isn't verified", claims.Email)
}
user := strings.Split(claims.Email, "@")[0]
session = &sessionsapi.SessionState{
AccessToken: rawBearerToken,
@ -925,7 +924,7 @@ func (p *OAuthProxy) GetJwtSession(req *http.Request) (*sessionsapi.SessionState
RefreshToken: "",
ExpiresOn: bearerToken.Expiry,
Email: claims.Email,
User: user,
User: claims.Email,
}
return session, nil
}