Skip to content
New issue

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

4.0.0-beta.9 next15.0.3 callback URL: basePath not supported #1834

Closed
6 tasks done
sean0x42 opened this issue Dec 4, 2024 · 2 comments
Closed
6 tasks done

4.0.0-beta.9 next15.0.3 callback URL: basePath not supported #1834

sean0x42 opened this issue Dec 4, 2024 · 2 comments

Comments

@sean0x42
Copy link

sean0x42 commented Dec 4, 2024

Checklist

Description

The callback URL after a successful login does not support a Next.js basePath. Even attaching the basePath to the APP_BASE_URL environment variable doesn't solve the issue.

You can verify this yourself by creating a URL in your browser console. e.g.:

new URL("/auth/callback", "https://localhost:3000/my-special-app");
// https://localhost:3000/auth/callback

Since basePath is a configurable property in Next.js (and a common requirement) I would expect this library to automatically detect and inject this basePath.

Reproduction

  1. Follow the steps in the README to setup your app
  2. Set a basePath in the next.config.js file
  3. Try to login. In my case, since the URL without the base path is not in the allowed callback URLs, I see the following error:

"http://localhost:3000/auth/callback is not in the list of allowed callback URLs"

Additional context

No response

nextjs-auth0 version

4.0.0-beta.9

Next.js version

next15.0.3

Node.js version

22.11.0

@guabu
Copy link

guabu commented Dec 4, 2024

Hi @sean0x42 👋 Currently the routes mounted by the SDK are not customizable. However, we will be making this configurable in the next release!

@guabu guabu mentioned this issue Dec 7, 2024
@nandan-bhat
Copy link

This issue is fixed on 4.0.0-beta.10. Closing this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants