🐛 Fix authorize redirect

This commit is contained in:
2025-09-26 01:34:26 +08:00
parent f8ad92ccf2
commit 888d3cb5ba

View File

@@ -157,7 +157,7 @@ function checkIfNewApp() {
async function handleAuthorize() { async function handleAuthorize() {
isAuthorizing.value = true isAuthorizing.value = true
try { try {
const data = await api<{ redirect_uri?: string }>( const data = await api<{ redirectUri?: string }>(
"/id/auth/open/authorize", "/id/auth/open/authorize",
{ {
method: "POST", method: "POST",
@@ -165,8 +165,8 @@ async function handleAuthorize() {
} }
) )
if (data.redirect_uri) { if (data.redirectUri) {
window.location.href = data.redirect_uri window.location.href = data.redirectUri
} }
} catch (err: any) { } catch (err: any) {
error.value = err.message || "An error occurred during authorization" error.value = err.message || "An error occurred during authorization"