Hosting next-auth app on vercel
Unanswered
Shiny Cowbird posted this in #help-forum
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
You can enable fluid compute to increase it, but it shouldn't be 10s
Shiny CowbirdOP
https://github.com/nextauthjs/next-auth/discussions/8944
https://www.reddit.com/r/nextjs/comments/117t880/nextjs_hosted_on_vercel_504_gateway_timeout/
these are some discussions I found about the same
https://www.reddit.com/r/nextjs/comments/117t880/nextjs_hosted_on_vercel_504_gateway_timeout/
these are some discussions I found about the same
@Anay-208 | Ping in replies You can enable fluid compute to increase it, but it shouldn't be 10s
Shiny CowbirdOP
how to do that?
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
Can you send your authjs config
Shiny CowbirdOP
https://sourceb.in/0GCd0eu1Tv
route.js
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
@Shiny Cowbird https://sourceb.in/0GCd0eu1Tv
route.js
js
import NextAuth from "next-auth";
import { options } from "./options";
const handler = NextAuth(options)
export { handler as GET, handler as POST };
can you try using authjs?
Its basically like a newer version of next-auth
Its basically like a newer version of next-auth
@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

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 )