nextauthjs / next-auth

Authentication for the Web.
https://authjs.dev
ISC License
24.96k stars 3.52k forks source link

Docker setup guide needed #10734

Closed axten closed 6 months ago

axten commented 6 months ago

What is the improvement or update you wish to see?

Hello, I spend hours to get auth.js v5 working in docker environment. After numerous searches, I found a thread where "NEXTAUTH_URL_INTERNAL" was mentioned and that did the trick. Problem is that the next app in the docker container still has host localhost:3000, even in production in kubernetes. Without this env var set to http://localhost:3000, it was not working and just failing with a non helpful error message.

would be nice to have docs about this for others. kind regards

PS: it's a bit strange that this is the only env var that is still prefixed with NEXTAUTH instead of AUTH

Is there any context that might help us understand?

next running inside docker keycloak provider next 14.2.3 next-auth 5.0.0-beta.16

Does the docs page already exist? Please link to it.

No response

balazsorban44 commented 6 months ago

Check out https://authjs.dev/getting-started/deployment#docker

We even have a hosted example.