diff options
author | oGi4i <oGi4i@users.noreply.github.com> | 2022-06-17 01:29:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-16 23:29:54 +0100 |
commit | 9068c784c8af1c76f88f94ada1bf5ee21c3cd25b (patch) | |
tree | e1b10b2d44073fd44ce9973a19b06269744d0176 /routers/web/auth/oauth.go | |
parent | e3e06d13afdd882ca5934fde77217ff9554354c4 (diff) | |
download | gitea-9068c784c8af1c76f88f94ada1bf5ee21c3cd25b.tar.gz gitea-9068c784c8af1c76f88f94ada1bf5ee21c3cd25b.zip |
Use DisplayName() instead of FullName in Oauth provider (#19991)
Use DisplayName() in Oauth as this provides a fallback if FullName is not set.
Closes #19382
Diffstat (limited to 'routers/web/auth/oauth.go')
-rw-r--r-- | routers/web/auth/oauth.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/auth/oauth.go b/routers/web/auth/oauth.go index f646615968..d868b05a44 100644 --- a/routers/web/auth/oauth.go +++ b/routers/web/auth/oauth.go @@ -215,7 +215,7 @@ func newAccessTokenResponse(ctx stdContext.Context, grant *auth.OAuth2Grant, ser Nonce: grant.Nonce, } if grant.ScopeContains("profile") { - idToken.Name = user.FullName + idToken.Name = user.GetDisplayName() idToken.PreferredUsername = user.Name idToken.Profile = user.HTMLURL() idToken.Picture = user.AvatarLink() |