Closed luminous8 closed 2 months ago
So i fixed it by using the new NUXTOAUTH
i'm still interested if that the new expected behaviour
This might be a bug @luminous8 sorry about this and thanks for reporting
thanks for the update @atinux 🙏
For some reasons the redirect_uri is localhost where i'm on my prod server (works fine on localhost as you can guess) From what i've seens redirect_uri is based on redirectUrl
const redirectURL = config.redirectURL || getRequestURL(event).href;
I have no idea where config.redirectURL comes from but i haven't defined "NUXT_OAUTH_GOOGLE_REDIRECT_URL" so it should take the current url which is api/auth/google
@luminous8
config.redirectUrl
comes from nuxt.config.ts as runtimeConfig.oauth.<provider>.redirectUrl
. You could set it there if it makes more sense than using the NUXT_ var.
Both work for me; it's just that by default, when your config isn't "specific" (i.e., there's no added value in using the redirectUrl), it should work as it did before
Can you confirm that pinning the version to 0.3.3
that the issue is gone @luminous8 ?
The way it's implemented I don't see where config.redirectURL
could be defined and take over the redirectUrl.
Are you behind a reverse proxy for your production deployment?
It works for me with latest version of nuxt-auth-utils
in production on https://draw.nuxt.dev/draw
I've reverted to 0.3.3 and it worked then updated to 0.3.4 and... it worked as well!
So i'm not sure what was the issue before but it works
fyi, it's deployed on CF with nuxthub (great product btw)
Hi,
I've recently updated to nuxt-auth-utils 0.3.4 and my code stopped working (i made some other changes but not related to auth so i'm not sure where the issue comes from)
When doing a Google Auth, I'm getting an
Error 400: redirect_uri_mismatch
that i didn't had beforeFor some reasons the redirect_uri is localhost where i'm on my prod server (works fine on localhost as you can guess) From what i've seens redirect_uri is based on redirectUrl
const redirectURL = config.redirectURL || getRequestURL(event).href;
I have no idea where config.redirectURL comes from but i haven't defined "NUXT_OAUTH_GOOGLE_REDIRECT_URL" so it should take the current url which is api/auth/googleAny idea where to look? i had this bug for a week but cannot find a way to fix it
Thanks