diff options
author | Giteabot <teabot@gitea.io> | 2023-06-14 22:48:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-15 02:48:36 +0000 |
commit | b45ea0280b6a48bbcd804a49ae3507d84f95b34f (patch) | |
tree | 2d6c137c4c1deee38c13d4fdfa8074d011dab9fd /web_src/js | |
parent | 031ddfcb7b173684de66c622370ffeff5438ac52 (diff) | |
download | gitea-b45ea0280b6a48bbcd804a49ae3507d84f95b34f.tar.gz gitea-b45ea0280b6a48bbcd804a49ae3507d84f95b34f.zip |
Show OAuth2 errors to end users (#25261) (#25271)
Backport #25261 by @wxiaoguang
Partially fix #23936
![image](https://github.com/go-gitea/gitea/assets/2114189/8aa7f3ad-a5f0-42ce-a478-289a03bd08a3)
![image](https://github.com/go-gitea/gitea/assets/2114189/bb901e7d-485a-47a5-b68d-9ebe7013a6b2)
![image](https://github.com/go-gitea/gitea/assets/2114189/9a1ce0f3-f011-4baf-8e2f-cc6304bc9703)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'web_src/js')
-rw-r--r-- | web_src/js/features/admin/common.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web_src/js/features/admin/common.js b/web_src/js/features/admin/common.js index 84fd35e081..b6b192a296 100644 --- a/web_src/js/features/admin/common.js +++ b/web_src/js/features/admin/common.js @@ -171,6 +171,12 @@ export function initAdminCommon() { } } + if ($('.admin.authentication').length > 0) { + $('#auth_name').on('input', function () { + $('#oauth2-callback-url').text(`${window.location.origin}/user/oauth2/${encodeURIComponent($(this).val())}/callback`); + }).trigger('input'); + } + // Notice if ($('.admin.notice')) { const $detailModal = $('#detail-modal'); |