Next.js Discord

Discord Forum

Hosting next-auth app on vercel

Unanswered
Shiny Cowbird posted this in #help-forum
Open in Discord
Shiny CowbirdOP
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?
Shiny CowbirdOP
I am not really sure myself, I thought it was normal
gave it to chatgpt got this
the fluid compute thing
@Shiny Cowbird 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
Shiny CowbirdOP
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 };
@Anay-208 | Ping in replies You shouldn't do that, because This is not really a correct solution to pick. Can you send your authjs config
Shiny CowbirdOP
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
@Anay-208 | Ping in replies can you try using authjs? Its basically like a newer version of next-auth
Shiny CowbirdOP
there's nothing we can do with what we already have now?
well I am trying authjs rn
@Anay-208 | Ping in replies can you try using authjs? Its basically like a newer version of next-auth
Shiny CowbirdOP
:sunglasses_1: tried to try it, 4hrs of debugging later no conclusion, lets try to work with what I already have
Shiny CowbirdOP
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
Shiny CowbirdOP
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
@Shiny Cowbird 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
Shiny CowbirdOP
ok ( tomorrow, busy today )