diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-04-25 19:22:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-25 11:22:32 +0000 |
commit | bffbbf547063fa170cc52ae2e757d5badb336632 (patch) | |
tree | de5e17bfdbc504c7c9788ebcd09978340e241b40 /templates/user | |
parent | d0bfc978de802683b9a44720b7f5a8a8394d38be (diff) | |
download | gitea-bffbbf547063fa170cc52ae2e757d5badb336632.tar.gz gitea-bffbbf547063fa170cc52ae2e757d5badb336632.zip |
Improve oauth2 client "preferred username field" logic and the error handling (#30622)
Follow #30454
And fix #24957
When using "preferred_username", if no such field,
`extractUserNameFromOAuth2` (old `getUserName`) shouldn't return an
error. All other USERNAME options do not return such error.
And fine tune some logic and error messages, make code more stable and
more friendly to end users.
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/auth/link_account.tmpl | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/templates/user/auth/link_account.tmpl b/templates/user/auth/link_account.tmpl index 8dd49ccd60..a99e172d05 100644 --- a/templates/user/auth/link_account.tmpl +++ b/templates/user/auth/link_account.tmpl @@ -17,15 +17,12 @@ </overflow-menu> <div class="ui middle very relaxed page grid"> <div class="column"> - <div class="ui tab {{if not .user_exists}}active{{end}}" - data-tab="auth-link-signup-tab"> + <div class="ui tab {{if not .user_exists}}active{{end}}" data-tab="auth-link-signup-tab"> + {{if .AutoRegistrationFailedPrompt}}<div class="ui message">{{.AutoRegistrationFailedPrompt}}</div>{{end}} {{template "user/auth/signup_inner" .}} </div> - <div class="ui tab {{if .user_exists}}active{{end}}" - data-tab="auth-link-signin-tab"> - <div class="ui user signin container icon"> - {{template "user/auth/signin_inner" .}} - </div> + <div class="ui tab {{if .user_exists}}active{{end}}" data-tab="auth-link-signin-tab"> + {{template "user/auth/signin_inner" .}} </div> </div> </div> |