Next.js Discord

Discord Forum

Hosting next-auth app on vercel

Unanswered
Northern Pintail posted this in #help-forum
Open in Discord
Northern PintailOP
While hosting a next-auth app on vercel, I was faced with a issue of being timed out because it took longer than 10 seconds which vercel doesnt allow, is there a way around of this or I would just have to choose another host? I mean next-auth is one of the very much used libraries there should be something around it

29 Replies

Cape lion
why does it take 10 seconds at all?
@Cape lion why does it take 10 seconds at all?
Northern PintailOP
I am not really sure myself, I thought it was normal
gave it to chatgpt got this
@"use php" You can enable fluid compute to increase it, but it shouldn't be 10s
Northern PintailOP
how to do that?
the fluid compute thing
@Northern Pintail how to do that?
You shouldn't do that, because This is not really a correct solution to pick.
Can you send your authjs config
Northern PintailOP
https://sourceb.in/0GCd0eu1Tv

route.js
import NextAuth from "next-auth";
import { options } from "./options";

const handler = NextAuth(options)

export { handler as GET, handler as POST };
@"use php" You shouldn't do that, because This is not really a correct solution to pick. Can you send your authjs config
Northern PintailOP
I dont have a authjs, I have options and route mostly because I followed a tutorial which never involved making one and everything works smoothly in the local enviorment
so I thought I didnt need it
there was nothing specifically about auth.js being a requirement to host on vercel
@"use php" can you try using authjs? Its basically like a newer version of next-auth
Northern PintailOP
there's nothing we can do with what we already have now?
well I am trying authjs rn
@"use php" can you try using authjs? Its basically like a newer version of next-auth
Northern PintailOP
:sunglasses_1: tried to try it, 4hrs of debugging later no conclusion, lets try to work with what I already have
Northern PintailOP
Are sourceb.in links ok with you for sharing? Rather that whole minimal reproduction repository, yk it would be a bit easier for me
these should be the only important ones
Northern PintailOP
ok gimme a bit of time
wait how do I share with you the keys like I have mongodb keys, google auth keys and all
@Northern Pintail wait how do I share with you the keys like I have mongodb keys, google auth keys and all
You don't need to share all of that, just specify env variables to be added
Northern PintailOP
ok ( tomorrow, busy today )