Skip to content
Discussion options

You must be logged in to vote

@rdbarr and I work together, so I'm bumping the question and adding some clarification for our use case. Using the boilerplate withAuth is technically working:

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

const middleware = withAuth({
  pages: {
    signIn: '/sign-in',
  },
});

export default middleware;

It redirects to my custom sign-in page, but it's blank, and the console is showing this error in 6 files:

Uncaught SyntaxError: Unexpected token '<'.

The sign-in page doesn't return that error if it's not redirected there from middleware.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@balazsorban44
Comment options

@rdbarr
Comment options

Answer selected by rdbarr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants