diff --git a/dictation_client/src/App.tsx b/dictation_client/src/App.tsx index 676df3d..39bfec6 100644 --- a/dictation_client/src/App.tsx +++ b/dictation_client/src/App.tsx @@ -24,7 +24,7 @@ const App = (): JSX.Element => { (e: AxiosError) => { if (e?.response?.status === 401) { dispatch(clearToken()); - instance.logout({ + instance.logoutRedirect({ postLogoutRedirectUri: "/?logout=true", }); } diff --git a/dictation_client/src/components/auth/routeAuthGuard.tsx b/dictation_client/src/components/auth/routeAuthGuard.tsx index 7b4d9d0..37a14ac 100644 --- a/dictation_client/src/components/auth/routeAuthGuard.tsx +++ b/dictation_client/src/components/auth/routeAuthGuard.tsx @@ -23,7 +23,7 @@ export const RouteAuthGuard = (props: RouteAuthGuardProps) => { if (!isAuth || isExpired) { dispatch(clearToken()); // B2Cからもログアウトする - instance.logout({ + instance.logoutRedirect({ postLogoutRedirectUri: "/?logout=true", }); } diff --git a/dictation_client/src/pages/LicensePage/index.tsx b/dictation_client/src/pages/LicensePage/index.tsx index 26d2ab3..95f65f3 100644 --- a/dictation_client/src/pages/LicensePage/index.tsx +++ b/dictation_client/src/pages/LicensePage/index.tsx @@ -16,7 +16,7 @@ const LicensePage: React.FC = (): JSX.Element => { const redirectToTopPage = useCallback(() => { dispatch(clearToken()); - instance.logout({ + instance.logoutRedirect({ postLogoutRedirectUri: "/", }); }, [dispatch, instance]); diff --git a/dictation_client/src/pages/LoginPage/index.tsx b/dictation_client/src/pages/LoginPage/index.tsx index 002ee2f..ba7f6b0 100644 --- a/dictation_client/src/pages/LoginPage/index.tsx +++ b/dictation_client/src/pages/LoginPage/index.tsx @@ -25,7 +25,7 @@ const LoginPage: React.FC = (): JSX.Element => { // ログイン失敗した場合、B2Cをログアウトしてからエラーページに遷移する if (meta.requestStatus === "rejected") { - instance.logout({ + instance.logoutRedirect({ postLogoutRedirectUri: "/AuthError", }); } diff --git a/dictation_client/src/pages/SamplePage/index.tsx b/dictation_client/src/pages/SamplePage/index.tsx index 1d62cfa..ee3d56b 100644 --- a/dictation_client/src/pages/SamplePage/index.tsx +++ b/dictation_client/src/pages/SamplePage/index.tsx @@ -20,7 +20,7 @@ const SamplePage: React.FC = (): JSX.Element => { type="button" className={styles.buttonText} onClick={() => { - instance.logout({ postLogoutRedirectUri: "/" }); + instance.logoutRedirect({ postLogoutRedirectUri: "/" }); dispatch(clearToken()); }} >