Skip to content
New issue

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

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

Already on GitHub? # to your account

TypeError: Cannot read properties of undefined (reading 'auth') #10715

Closed
rubixvi opened this issue Jan 22, 2025 · 2 comments · Fixed by #10717
Closed

TypeError: Cannot read properties of undefined (reading 'auth') #10715

rubixvi opened this issue Jan 22, 2025 · 2 comments · Fixed by #10717
Assignees

Comments

@rubixvi
Copy link

rubixvi commented Jan 22, 2025

Describe the Bug

This is present in local builds and within the one-click deployment on Vercel.

collections/Users.ts

auth: true
  auth: {
    tokenExpiration: 28800,
    cookies: {
      sameSite: 'None',
      secure: true,
      domain: process.env.COOKIE_DOMAIN,
    },
    loginWithUsername: {
      allowEmailLogin: true,
      requireEmail: false,
    },
  },

TypeError: Cannot read properties of undefined (reading 'auth')

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/blob/main/templates/with-vercel-website/src/collections/Users/index.ts

Reproduction Steps

This is present in local builds and within the one-click deployment on Vercel.

Which area(s) are affected? (Select all that apply)

area: core, area: templates

Environment Info

"payload": "^3.16.0"
"next": "15.1.4"
Copy link
Contributor

🚀 This is included in version v3.19.0

Copy link
Contributor

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants