Compare commits
2 Commits
0a9f011f08
...
ba125f1381
| Author | SHA1 | Date | |
|---|---|---|---|
| ba125f1381 | |||
| 7e8d26dc53 |
@ -24,7 +24,7 @@ export const submitProviderCallback = async (
|
||||
throw new Error("Failed to get auth client callback URL");
|
||||
|
||||
const responseProvision = (await backendFetch(
|
||||
`${authClientCallbackUrl.data?.callback_url!}?callbackURI=${
|
||||
`${authClientCallbackUrl.data?.callback_url}?callbackURI=${
|
||||
process.env.APP_URL
|
||||
}${process.env[envKey]}&${queries}`,
|
||||
)) as BackendResponse<{
|
||||
@ -36,7 +36,7 @@ export const submitProviderCallback = async (
|
||||
|
||||
(await cookies()).set({
|
||||
name: "auth_token",
|
||||
value: responseProvision.data?.authToken!,
|
||||
value: responseProvision.data?.authToken || "",
|
||||
httpOnly: true,
|
||||
path: "/",
|
||||
secure: process.env.NODE_ENV === "production",
|
||||
|
||||
@ -31,7 +31,7 @@ const AuthCallbackIndex = () => {
|
||||
finishOAuthFlow("oauth-failed");
|
||||
}
|
||||
})();
|
||||
}, []);
|
||||
}, [name, queries]);
|
||||
|
||||
return (
|
||||
<div className="w-full flex flex-col items-center gap-2 pt-8">
|
||||
|
||||
@ -7,7 +7,7 @@ import AuthSessionProvider from "./AuthSession.client";
|
||||
const AuthSessionProviderWrapper = async ({
|
||||
children,
|
||||
}: Readonly<{ children: React.ReactNode }>) => {
|
||||
let session: UserSession | null = await validateAndDecodeJWT();
|
||||
const session: UserSession | null = await validateAndDecodeJWT();
|
||||
|
||||
return (
|
||||
<AuthSessionProvider session={session}>{children}</AuthSessionProvider>
|
||||
|
||||
Reference in New Issue
Block a user