Update web/app/account/oauth/authorize/page.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Stephen Zhou
2026-03-20 11:07:14 +08:00
committed by GitHub
parent f7ce52e212
commit 52a65fcd5a

View File

@@ -71,6 +71,8 @@ export default function OAuthAuthorize() {
const isLoading = isOAuthLoading || isIsLoginLoading
const isActionDisabled = !client_id || !redirect_uri || isError || isLoading || authorizing
const onLoginSwitchClick = () => {
if (isLoading)
return
try {
const returnUrl = buildReturnUrl('/account/oauth/authorize', `?client_id=${encodeURIComponent(client_id)}&redirect_uri=${encodeURIComponent(redirect_uri)}`)
setPostLoginRedirect(returnUrl)