sidebase / nuxt-auth

Authentication built for Nuxt 3! Easily add authentication via OAuth providers, credentials or Email Magic URLs!
https://auth.sidebase.io
MIT License
1.31k stars 164 forks source link

baseURL is not working #772

Closed zecar closed 4 months ago

zecar commented 4 months ago

Environment


Reproduction

setup auth module option inside nuxt.config.ts to

baseURL: 'http://project.local:3001',

Describe the bug

the <form> element from the default signin page keeps pointing to "localhost" instead of what was set in nuxtConfig.auth.baseURL

image

Additional context

No response

Logs

No response

zoey-kaiser commented 4 months ago

Hi @zecar 👋

What other environment variables do you pass? Also, how do you overwrite nuxtConfig.auth.baseURL? If you are using an environment variable in your Nuxt Config, you will need to set it at built time.

zecar commented 4 months ago

@zoey-kaiser, sorry for not updating

I got this working by passing AUTH_ORIGIN and NEXTAUTH_URL as env variables

please update the docs of the project with this usecase