Can't make basePath to work #4750
-
I want to run NextJS + Next-Auth under an next.config.js
pages/_app.js
Now When I open
[...nextauth].js Is basic, copy-pasted from the docs: export default NextAuth({
providers: [
CredentialsProvider({
name: "Credentials",
credentials: {
username: {label: "Username", type: "text"},
password: {label: "Password", type: "password"},
},
async authorize(credentials, req) {
...
}
})
], ❗ If I remove What do I miss?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
UpdateThe above issue can be fixed by defining
It's still unclear why it's necessary to set |
Beta Was this translation helpful? Give feedback.
Update
The above issue can be fixed by defining
NEXTAUTH_URL
like:It's still unclear why it's necessary to set
basePath
twice but whatever 🤷