Redirect to the only OAuth2 provider when no other login methods and fix various problems (#36901)

Fixes: #36846 

1. When there is only on OAuth2 login method, automatically direct to it
2. Fix legacy problems in code, including:
   * Rename template filename and fix TODO comments
   * Fix legacy variable names
   * Add missing SSPI variable for template
   * Fix unnecessary layout, remove garbage styles
* Only do AppUrl(ROOT_URL) check when it is needed (avoid unnecessary
warnings to end users)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Navneet
2026-04-01 18:20:57 +05:30
committed by GitHub
parent ca8c71359c
commit 3ffccb8fe5
11 changed files with 116 additions and 58 deletions

View File

@@ -20,7 +20,7 @@ import {initStopwatch} from './features/stopwatch.ts';
import {initRepoFileSearch} from './features/repo-findfile.ts';
import {initMarkupContent} from './markup/content.ts';
import {initRepoFileView} from './features/file-view.ts';
import {initUserAuthOauth2, initUserCheckAppUrl} from './features/user-auth.ts';
import {initUserExternalLogins, initUserCheckAppUrl} from './features/user-auth.ts';
import {initRepoPullRequestReview, initRepoIssueFilterItemLabel} from './features/repo-issue.ts';
import {initRepoEllipsisButton, initCommitStatuses} from './features/repo-commit.ts';
import {initRepoTopicBar} from './features/repo-home.ts';
@@ -149,7 +149,7 @@ const initPerformanceTracer = callInitFunctions([
initCaptcha,
initUserCheckAppUrl,
initUserAuthOauth2,
initUserExternalLogins,
initUserAuthWebAuthn,
initUserAuthWebAuthnRegister,
initUserSettings,