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.25k stars 162 forks source link

BaseURL is used incorrectly #840

Closed tpkee closed 1 month ago

tpkee commented 1 month ago

Environment


Reproduction

Describe the bug

The domain is scrapped but not completely since the path is actually used. It should be: https://it-is.me/dio/usr/signin but instead it’s [localAddr]/dio/usr/signin

Additional context

The url is somehow modified to check if it’s a valid address, but shouldn’t it be up to the implementer — not the library — to guarantee its correctness?

Logs

Selected provider: refresh. Auth API location is https://it-is.me/dio/
drexsi commented 1 month ago

Got around this issue by making the path inside endpoints config not start with "/"

endpoint:{ signIn: { path: 'login' } }

zoey-kaiser commented 1 month ago

As said above please check out the docs on how to use an external API here: https://auth.sidebase.io/guide/local/quick-start#using-an-external-backend

we are also currently discussing improvements to the baseURL inference here: https://github.com/sidebase/nuxt-auth/issues/797, feel free to add your suggestions there 😊