79108052

Date: 2024-10-20 21:02:25
Score: 2.5
Natty:
Report link

can we use database functions using the edge runtime in nextjs? yes and no. you cannot directly use it but i have found out a solution to this, one method is to make an route handler (api). and using fetch in the edge runtime.

Possible Method for you usecase

in auth.js you can create separate auth.config.ts (which will not be using any kind of database operation that is not supported in the edge runtime github authjs5-nextjs

Reasons:
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): can we use
  • Low reputation (1):
Posted by: Saad Bukhari