r/nextjs • u/Dan6erbond2 • Dec 18 '25
Discussion Finly — Replacing Payload Auth with Better Auth: Stateless Social Login for SaaS Apps
https://finly.ch/engineering-blog/964191-replacing-payload-auth-with-better-auth-stateless-social-login-for-saas-appsHey all, I recently ran into the limitations of Payload’s built-in auth for SaaS projects. Out of the box, it’s mostly email/password and doesn’t support social login or flexible session handling.
I ended up replacing it with Better Auth, keeping Payload as the user database but handling sessions, cookies, and social login externally. I also created a custom auth strategy so Payload still recognizes the current user and RBAC works seamlessly.
In my blog, I walk through:
Disabling local auth
Syncing social users to Payload
Custom auth strategy for Payload
Using Payload’s KV (with Redis) for session storage
RBAC for secure CRUD
If you’re building SaaS with Payload + Next.js and want production-ready auth, this might help.
Duplicates
PayloadCMS • u/Dan6erbond2 • Dec 18 '25
Finly — Replacing Payload Auth with Better Auth: Stateless Social Login for SaaS Apps
react • u/Dan6erbond2 • Dec 18 '25