mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 18:30:32 -06:00
fix: secure cookies fix for callback URL (#6358)
This commit is contained in:
@@ -319,7 +319,11 @@ export const authOptions: NextAuthOptions = {
|
||||
async signIn({ user, account }: { user: TUser; account: Account }) {
|
||||
const cookieStore = await cookies();
|
||||
|
||||
const callbackUrl = cookieStore.get("next-auth.callback-url")?.value || "";
|
||||
// get callback url from the cookie store,
|
||||
const callbackUrl =
|
||||
cookieStore.get("__Secure-next-auth.callback-url")?.value ||
|
||||
cookieStore.get("next-auth.callback-url")?.value ||
|
||||
"";
|
||||
|
||||
if (account?.provider === "credentials" || account?.provider === "token") {
|
||||
// check if user's email is verified or not
|
||||
|
||||
Reference in New Issue
Block a user