Skip to content

Commit

Permalink
Use user.FullName in Oauth2 id_token response
Browse files Browse the repository at this point in the history
This makes `/#/oauth/authorize` behave the same way as the
`/#/oauth/userinfo` endpoint.
  • Loading branch information
baltitenger committed Nov 17, 2024
1 parent c3dedcf commit bd16728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/oauth2_provider/access_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func NewAccessTokenResponse(ctx context.Context, grant *auth.OAuth2Grant, server
Nonce: grant.Nonce,
}
if grant.ScopeContains("profile") {
idToken.Name = user.GetDisplayName()
idToken.Name = user.FullName
idToken.PreferredUsername = user.Name
idToken.Profile = user.HTMLURL()
idToken.Picture = user.AvatarLink(ctx)
Expand Down

0 comments on commit bd16728

Please # to comment.