1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-19 00:38:36 +00:00

Use user.FullName in Oauth2 id_token response (#32542)

This makes `/login/oauth/authorize` behave the same way as the
`/login/oauth/userinfo` endpoint.
This commit is contained in:
Baltazár Radics
2024-11-18 12:24:17 +01:00
committed by GitHub
parent 896314c7a2
commit 5eb0ee49a1
3 changed files with 3 additions and 22 deletions

View File

@@ -98,7 +98,7 @@ func InfoOAuth(ctx *context.Context) {
response := &userInfoResponse{
Sub: fmt.Sprint(ctx.Doer.ID),
Name: ctx.Doer.FullName,
Name: ctx.Doer.DisplayName(),
PreferredUsername: ctx.Doer.Name,
Email: ctx.Doer.Email,
Picture: ctx.Doer.AvatarLink(ctx),