basePath feature breaks auth0 (and presumably authentik) provider #9743
Labels
bug
Something isn't working
invalid reproduction
The issue did not have a detectable valid reproduction URL
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Environment
Reproduction URL
--
Describe the issue
The recent addition of the
basePath
feature has caused any provider that starts withauth
(e.g.auth0
,authentik
) to break when using the default base path (/auth
).The problem is here: https://github.com/nextauthjs/next-auth/pull/9686/files#diff-e2783aeceecac8cd1b559372f242d520b894883a0c297fa4829ef4e5a5f35e88R134
pathname.split(base)
represents'/auth/signin/auth0'.split('/auth')
when using the Auth0 provider. As such the result of the operation is['', '/signin', '0']
which causes the function to throw since there's an expected length of 2.How to reproduce
--
Expected behavior
--
The text was updated successfully, but these errors were encountered: