feat(ui): refreshToken implementation (#8864)

This commit is contained in:
Alejandro Bailo
2025-10-10 11:02:10 +02:00
committed by GitHub
parent ef60ea99c3
commit 046baa8eb9
10 changed files with 618 additions and 117 deletions

View File

@@ -35,6 +35,7 @@ export const SignInForm = ({
useEffect(() => {
const samlError = searchParams.get("sso_saml_failed");
const sessionError = searchParams.get("error");
if (samlError) {
setTimeout(() => {
@@ -46,6 +47,37 @@ export const SignInForm = ({
});
}, 100);
}
if (sessionError) {
setTimeout(() => {
const errorMessages: Record<
string,
{ title: string; description: string }
> = {
RefreshAccessTokenError: {
title: "Session Expired",
description:
"Your session has expired. Please sign in again to continue.",
},
MissingRefreshToken: {
title: "Session Error",
description:
"There was a problem with your session. Please sign in again.",
},
};
const errorConfig = errorMessages[sessionError] || {
title: "Authentication Error",
description: "Please sign in again to continue.",
};
toast({
variant: "destructive",
title: errorConfig.title,
description: errorConfig.description,
});
}, 100);
}
}, [searchParams, toast]);
const form = useForm<SignInFormData>({