aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-06-15 09:12:50 +0800
committerGitHub <noreply@github.com>2023-06-15 01:12:50 +0000
commit73ae71824d64aa242451f54af5df7e8f8bfcf579 (patch)
treec6b552be5f6b8b3bf3732415181b68df9ddf69f0 /web_src
parent39a15623f6902b476cd6f8ea36992eecea62d410 (diff)
downloadgitea-73ae71824d64aa242451f54af5df7e8f8bfcf579.tar.gz
gitea-73ae71824d64aa242451f54af5df7e8f8bfcf579.zip
Show OAuth2 errors to end users (#25261)
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)
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/features/admin/common.js6
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');