Next.js Discord

Discord Forum

next auth multiple pages dosen't work

Unanswered
Siberian Blue Robin posted this in #help-forum
Open in Discord
Siberian Blue RobinOP
I want to be able to visit multiple pages as unauthenticated user such as ['sign-in','sign-up','verify-request']
But whatever page i add it only redirect me to the signIn page with the callbackurl of the wanted page.
This is my middleware :
 
import { withAuth } from 'next-auth/middleware';
export default withAuth({
  // Matches the pages config in `[...nextauth]`
  pages: {
    signIn: '/auth/sign-in',
    verifyRequest: '/auth/verify-request',
  },
});

Even though i make sure that pages in middleware matchs the pages in [...nextauth]

1 Reply

Siberian Blue RobinOP
Bumped