🐛 Fixes in authorize

This commit is contained in:
2025-08-25 21:22:04 +08:00
parent 5f7ab49abb
commit eab2a388ae
2 changed files with 5 additions and 5 deletions

View File

@@ -156,7 +156,7 @@ public class OidcProviderController(
if (!string.IsNullOrEmpty(state)) queryParams["state"] = state;
errorUri.Query = queryParams.ToString();
return Redirect(errorUri.Uri.ToString());
return Ok(new { redirectUri = errorUri.Uri.ToString() });
}
// Validate redirect_uri if provided
@@ -201,7 +201,7 @@ public class OidcProviderController(
redirectBuilder.Query = queryParams.ToString();
return Redirect(redirectBuilder.Uri.ToString());
return Ok(new { redirectUri = redirectBuilder.Uri.ToString() });
}
catch (Exception ex)
{

View File

@@ -169,15 +169,15 @@ function handleDeny() {
error_description: 'The user denied the authorization request',
state: state,
})
window.location.href = `${redirectUri}?${params}`
window.open(`${redirectUri}?${params}`, "_self")
}
function openTerms() {
window.open(clientInfo.value?.terms_of_service_uri || 'https://example.com/terms', '_blank')
window.open(clientInfo.value?.terms_of_service_uri || '#', "_blank")
}
function openPrivacy() {
window.open(clientInfo.value?.privacy_policy_uri || 'https://example.com/privacy', '_blank')
window.open(clientInfo.value?.privacy_policy_uri || '#', "_blank")
}
// Lifecycle