Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError in authentication.md example fixed #33411

Merged
merged 2 commits into from
Jan 17, 2022

Conversation

hanneslund
Copy link
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
Member

@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
natew pushed a commit to natew/next.js that referenced this pull request Feb 16, 2022
Before
```jsx
export const getServerSideProps = withSession(async function ({ req, res }) {
  if (!req.session.user) {
    return {
      redirect: {
        destination: '/login',
        permanent: false,
      },
    }
  }

  return {
    props: { user }, // User not defined
  }
})
```
@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.

None yet

3 participants