-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Is your feature request related to a problem? Please describe.
Currently, when using withPasswordProtect() the initial render will always be "return null".
Only after the API call, the App is rendered. No matter if you are already logged in or not. This means when you are working with SSR/pages using getServerSideProps(), you can't verify that the HTML response is correct and that hydration will work in production.
Describe the solution you'd like
In theory, it should be possible to check the cookie and verify the session inside getServerSideProps().
Maybe an API could be added to perform the check in getServerSideProps() and pass the value of isAuthenticated to the ProtectedApp.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels