sidebase / nuxt-auth

🔐 Nuxt user authentication and sessions via authjs (next-auth), local and refresh providers. nuxt-auth wraps NextAuth.js to offer the reliability & convenience of a 12k star library to the nuxt 3 ecosystem with a native developer experience (DX)
https://sidebase.io/nuxt-auth/
MIT License
1.13k stars 134 forks source link

Need to set NEXTAUTH_URL and it's undocumented #773

Open dword-design opened 1 week ago

dword-design commented 1 week ago

Describe the feature

I need to set NEXTAUTH_URL, otherwise I get a warning in the console that it's not set and all callback urls are set to localhost. Here is what seems to work for me:

NEXTAUTH_URL=http://domain.local:port
baseURL or AUTH_ORIGIN=http://domain.local:port

See also this comment.

I couldn't get it to work with paths other than the default /api/auth.

Provider

basarozcan commented 1 week ago

Thank you for your comment @dword-design . I also faced with that issue and solved with using 'NEXTAUTH_URL' as you described

zoey-kaiser commented 6 days ago

Hi @dword-design 👋

We are currently working on a rewrite of our documentation to better explain and outline all the nuances such as required environment variables! Thank you for opening an issue to raise more awareness of this!

I will ensure that this information is properly included and outlined in the new documentation 🥳