How payload-authjs works
mainThe payload-authjs plugin integrates Auth.js 5 (beta) with Payload CMS 3 by:
- Automatically creating a
userscollection in Payload CMS. - Using a custom Auth.js Database Adapter to store users within the Payload CMS database.
- Using a custom Payload CMS Auth Strategy to retrieve sessions from Auth.js.
This allows you to sign in via Auth.js providers and be automatically authenticated within Payload CMS.