A walkthrough of replacing Payload CMS's built-in email-and-password auth with Better Auth, enabling a Next.js site and its Payload admin panel to share the same authenticated session. The implementation uses Better Auth's Email OTP plugin and a custom Payload auth strategy that extracts the Better Auth session from request

5m read timeFrom spin.atomicobject.com
Post cover image
Table of contents
Using Payload CMSEnter Better AuthCustom Strategy

Sort: