Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Integration for Authentication Providers #14129

francesco-hayes started this conversation in Feature Requests & Ideas
Discussion options

Curious what everyone things regarding the following:

Providing a way for people to integrate their own auth via a plugin system similar to the seamless ability Payload offers for database adapters. I imagine this'll be a config attribute like "database" but be labeled "auth" and allow people to import their desired auth provider like better-auth, etc.

Curios on what this'd look like and the pull to accomplish such as I've had to rewrite the auth in nearly every Payload CMS project for work / clients and it just seems like this could be made simpler.

import { buildConfig } from 'payload'
import { mongooseAdapter } from '@payloadcms/db-mongodb'
import { betterAuthAdapter } from '@payloadcms/auth'
export default buildConfig({
 secret: process.env.PAYLOAD_SECRET,
 db: mongooseAdapter({
 url: process.env.DATABASE_URI,
 }),
 collections: [
 {
 slug: 'pages',
 fields: [
 {
 name: 'title',
 type: 'text',
 },
 ],
 },
 ],
 auth: betterAuthAdapter({
 // options
 })
})
You must be logged in to vote

Replies: 1 comment

Comment options

same here, absolutely love better-auth

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /