Skip to content
Discussion options

You must be logged in to vote

getInitialProps also runs in the browser, so it's not possible, no.

You can rather try our Middleware instead to lock down the entire app in a single line

pages/_middleware.js

export { default } from "next-auth/middleware"

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@rizchaerul
Comment options

Answer selected by rizchaerul
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
triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
3 participants
Converted from issue

This discussion was converted from issue #4063 on February 25, 2022 02:25.