fix: add /platform prefix to signIn/signOut redirect URIs
LoginPage and useAuth used window.location.origin without the /platform base path, causing redirect_uri mismatch with Logto's registered URIs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,7 @@ export function LoginPage() {
|
||||
}
|
||||
|
||||
const handleLogin = () => {
|
||||
signIn(`${window.location.origin}/callback`);
|
||||
signIn(`${window.location.origin}/platform/callback`);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -7,7 +7,7 @@ export function useAuth() {
|
||||
const { currentTenantId } = useOrgStore();
|
||||
|
||||
const logout = useCallback(() => {
|
||||
signOut(window.location.origin + '/login');
|
||||
signOut(window.location.origin + '/platform/login');
|
||||
}, [signOut]);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user