Skip to content

Commit bd16728

Browse files
committed
Use user.FullName in Oauth2 id_token response
This makes `/login/oauth/authorize` behave the same way as the `/login/oauth/userinfo` endpoint.
1 parent c3dedcf commit bd16728

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/oauth2_provider/access_token.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func NewAccessTokenResponse(ctx context.Context, grant *auth.OAuth2Grant, server
148148
Nonce: grant.Nonce,
149149
}
150150
if grant.ScopeContains("profile") {
151-
idToken.Name = user.GetDisplayName()
151+
idToken.Name = user.FullName
152152
idToken.PreferredUsername = user.Name
153153
idToken.Profile = user.HTMLURL()
154154
idToken.Picture = user.AvatarLink(ctx)

0 commit comments

Comments
 (0)