Refactor app instance to Keycloak SSO
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
|
||||
import { buildAuthPortalUrl } from '@/lib/auth-portal';
|
||||
import { startKeycloakLogin } from '@/lib/keycloak-oidc';
|
||||
import { pickAppText } from '@/lib/i18n/core';
|
||||
import { useAppI18n } from '@/lib/i18n/provider';
|
||||
|
||||
@ -13,13 +13,13 @@ export default function RegisterRedirectPage() {
|
||||
|
||||
useEffect(() => {
|
||||
const nextPath = searchParams?.get('next') || '/mcp';
|
||||
window.location.replace(buildAuthPortalUrl('/register', nextPath));
|
||||
void startKeycloakLogin(nextPath);
|
||||
}, [searchParams]);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center px-4">
|
||||
<div className="text-sm text-muted-foreground">
|
||||
{pickAppText(locale, '正在跳转到注册门户...', 'Redirecting to the sign-up portal...')}
|
||||
{pickAppText(locale, '正在跳转到 Keycloak 登录...', 'Redirecting to Keycloak sign-in...')}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user