Skip to content

Incorrect Generated Callback URL #28

@crowdfoundry

Description

@crowdfoundry

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions