matt
matt
Explore posts from servers
TTCTheo's Typesafe Cult
Created by matt on 9/3/2024 in #questions
NextAuth v4 auth timing out when deployed to Vercel, but works locally
I figured it out... mongodb did allow access unless I specified...
13 replies
TTCTheo's Typesafe Cult
Created by matt on 9/3/2024 in #questions
NextAuth v4 auth timing out when deployed to Vercel, but works locally
except this is with Google and im using Discord, but exact same idea and issue
13 replies
TTCTheo's Typesafe Cult
Created by matt on 9/3/2024 in #questions
NextAuth v4 auth timing out when deployed to Vercel, but works locally
Looks like this post has the EXACT issue im having too: https://github.com/nextauthjs/next-auth/discussions/5057
13 replies
TTCTheo's Typesafe Cult
Created by matt on 9/3/2024 in #questions
NextAuth v4 auth timing out when deployed to Vercel, but works locally
I even set a config on my [...nextauth].ts file to extend the timeout for up to 30 seconds. It still just hangs for the ENTIRE 30 seconds then times out..
import NextAuth from "next-auth";
import { authOptions } from "~/server/auth";

// This function can run for a maximum of 30 seconds
export const config = {
maxDuration: 30,
};

export default NextAuth(authOptions);
import NextAuth from "next-auth";
import { authOptions } from "~/server/auth";

// This function can run for a maximum of 30 seconds
export const config = {
maxDuration: 30,
};

export default NextAuth(authOptions);
13 replies
TTCTheo's Typesafe Cult
Created by matt on 9/3/2024 in #questions
NextAuth v4 auth timing out when deployed to Vercel, but works locally
any other possible ideas? I believe that is all set up correctly
13 replies
TTCTheo's Typesafe Cult
Created by matt on 9/3/2024 in #questions
NextAuth v4 auth timing out when deployed to Vercel, but works locally
I dont see how a incorrect callbkack uri would cause an API call to hang
13 replies
TTCTheo's Typesafe Cult
Created by matt on 9/3/2024 in #questions
NextAuth v4 auth timing out when deployed to Vercel, but works locally
that seems correct unless im missing something
13 replies
TTCTheo's Typesafe Cult
Created by matt on 9/3/2024 in #questions
NextAuth v4 auth timing out when deployed to Vercel, but works locally
the redirect URI in the oauth2/authorize call to Discord is set to https%3A%2F%2Fcards-beyond-humanity.vercel.app%2Fapi%2Fauth%2Fcallback%2Fdiscord
13 replies
TTCTheo's Typesafe Cult
Created by matt on 9/3/2024 in #questions
NextAuth v4 auth timing out when deployed to Vercel, but works locally
would that be the NEXTAUTH_URL env variable?
13 replies
TTCTheo's Typesafe Cult
Created by matt on 9/3/2024 in #questions
NextAuth v4 auth timing out when deployed to Vercel, but works locally
No description
13 replies
TTCTheo's Typesafe Cult
Created by matt on 9/3/2024 in #questions
NextAuth v4 auth timing out when deployed to Vercel, but works locally
Feel free to try it yourself if you'd like https://cards-beyond-humanity.vercel.app/ Open network tab after signing in with Discord and you'll notice it just times out.
13 replies