We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I found your module by chance, trying to integrate Lucia into Nuxt. It works great so far in my own project, except for Google OAuth on callback:
ERROR [nuxt] [request error] [unhandled] [500] redirect_uri_mismatch at OAuth2Client.sendTokenRequest (./node_modules/.pnpm/[email protected]/node_modules/oslo/dist/oauth2/index.js:99:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OAuth2Client.validateAuthorizationCode (./node_modules/.pnpm/[email protected]/node_modules/oslo/dist/oauth2/index.js:59:16) at async Google.validateAuthorizationCode (./node_modules/.pnpm/[email protected]/node_modules/arctic/dist/providers/google.js:23:24) at Object.handler (./node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@fixers/nuxt-lucia-auth/dist/runtime/server/providers/google.js:55:22) at async ./node_modules/.pnpm/[email protected]/node_modules/h3/dist/index.mjs:1975:19 at async Object.callAsync (./node_modules/.pnpm/[email protected]/node_modules/unctx/dist/index.mjs:72:16) at async Server.toNodeHandle (./node_modules/.pnpm/[email protected]/node_modules/h3/dist/index.mjs:2266:7)
Upon investigation, I found that the provider uses the callback URL from the current request:
nuxt-lucia-auth/src/runtime/server/providers/google.ts
Lines 95 to 97 in 715989c
However, this includes the query parameters added by Google which need to be removed. Changing this to
const redirectUrl = getRequestURL(event).href.split['?'][0]
will remove the query part of the callback URL and I can authentication works.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I found your module by chance, trying to integrate Lucia into Nuxt. It works great so far in my own project, except for Google OAuth on callback:
Upon investigation, I found that the provider uses the callback URL from the current request:
nuxt-lucia-auth/src/runtime/server/providers/google.ts
Lines 95 to 97 in 715989c
However, this includes the query parameters added by Google which need to be removed. Changing this to
will remove the query part of the callback URL and I can authentication works.
The text was updated successfully, but these errors were encountered: