cli icon indicating copy to clipboard operation
cli copied to clipboard

Incorrect Generated Callback URL

Open crowdfoundry opened this issue 5 months ago • 0 comments

Environment

System: OS: Linux 6.8 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat) CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz Memory: 47.78 GB / 62.64 GB Container: Yes Shell: 5.2.21 - /bin/bash Binaries: Node: 24.0.2 - ~/.nvm/versions/node/v24.0.2/bin/node npm: 11.3.0 - ~/.nvm/versions/node/v24.0.2/bin/npm npmPackages: @auth/unstorage-adapter: ^2.0.0 => 2.10.0 next: latest => 15.5.2 next-auth: beta => 5.0.0-beta.29 react: ^18.2.0 => 18.3.1

Describe the issue

Using this cli to add providers to the next-auth example project, it generated mismatching redirect uri.

CLI Generated uri was: [domain]/api/auth/callback/[provider] but Next.js on sign on is sending redirect parameter: [domain]/auth/callback/[provider]

Not sure if this has changed from previous versions, haven't the time to look into more tonight. Hope this helps someone

How to reproduce

https://github.com/nextauthjs/next-auth/tree/main/apps/examples/nextjs

user cli to add provider

Expected behavior

output correct url generated in cli tool

crowdfoundry avatar Sep 04 '25 01:09 crowdfoundry