Skip to content

getInitialProps from _app are lost when using withPasswordProtect() #59

Description

@specialfae

Describe the bug
Any props set within custom _app component are lost when exporting withPasswordProtect()

To Reproduce
Steps to reproduce the behaviour:

  1. Setup a custom _app file with getInitialProps setting a value.
  2. Export using withPasswordProtect()
  3. Login successfully
  4. Console log _app props on page and they're undefined
  5. Leave everything as is except remove withPasswordProtect() and your props will re-appear on the page

Expected behavior
Props from _app shouldn't be overwritten or lost.

Stack
Node fermium, Next 12, next-password-protect 1.7

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions