Skip to content

Infinite redirect loop with custom signin page and middleware #4136

Answered by dimbslmh
ghost asked this question in Help
Discussion options

You must be logged in to vote

pages/_middleware.ts:

import { withAuth } from "next-auth/middleware";

export default withAuth({
  pages: {
    signIn: "/auth/signin",
  },
});

Replies: 4 comments 14 replies

Comment options

You must be logged in to vote
13 replies
@dimbslmh
Comment options

@kblizeck
Comment options

@danslobodan
Comment options

@krishnaacharyaa
Comment options

@danslobodan
Comment options

Answer selected
Comment options

You must be logged in to vote
1 reply
@lisander-lopez
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet