Skip to content

ReferenceError in authentication.md example fixed#33411

Merged
kodiakhq[bot] merged 2 commits intovercel:canaryfrom
hanneslund:auth-example-reference-error
Jan 17, 2022
Merged

ReferenceError in authentication.md example fixed#33411
kodiakhq[bot] merged 2 commits intovercel:canaryfrom
hanneslund:auth-example-reference-error

Conversation

@hanneslund
Copy link
Copy Markdown
Contributor

@hanneslund hanneslund commented Jan 17, 2022

Before

export const getServerSideProps = withSession(async function ({ req, res }) {
  if (!req.session.user) {
    return {
      redirect: {
        destination: '/login',
        permanent: false,
      },
    }
  }

  return {
    props: { user }, // User not defined
  }
})

@hanneslund hanneslund changed the title ReferenceError in authentication.md exampe fixed ReferenceError in authentication.md example fixed Jan 17, 2022
Copy link
Copy Markdown
Contributor

@leerob leerob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@kodiakhq kodiakhq Bot merged commit c634d76 into vercel:canary Jan 17, 2022
@hanneslund hanneslund deleted the auth-example-reference-error branch January 17, 2022 21:16
@vercel vercel locked as resolved and limited conversation to collaborators Feb 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants