Social Auth

Adds GitHub, Google, Facebook, Twitter, and LinkedIn OAuth login to the Payload admin sign-in screen.

Community 2 MIT v1.0.0

Installation

pnpm add payload-social-auth

About

This plugin adds social sign-in to a Payload v3 admin panel. When it is registered, it puts a row of provider buttons on the login screen through a `beforeLogin` component, and it registers an OAuth endpoint for each provider that has credentials in the options. Supported providers are GitHub, Google, Facebook, Twitter, and LinkedIn. A provider is active only when its `clientId` and `clientSecret` are set. The plugin changes the config of every collection that has `auth` enabled. It adds hidden, read-only sidebar fields named `socialProvider`, `socialId`, and `socialProviders` (an array of provider and id pairs), plus a `socialProvidersList` text field that a `beforeChange` hook fills with a comma-separated list of linked providers. It also adds a required, unique `email` field if the collection has none. When the user already has a social identity, the email field stops accepting updates. The list column is appended to `defaultColumns` in the admin list view. The options object takes `providers`, `disabled`, and a few top-level settings: `jwtSecret`, `cookieName`, `autoCreateUser`, `defaultRole`, `onAuthSuccess`, and `onAuthFailure`. The README describes these as working, but the plugin entry file only reads `disabled` and `providers` directly. Check the endpoint handlers before relying on the others. Each provider accepts an optional `callbackURL` and `scope`. The README and the type definitions give different default callback paths, so confirm the redirect URI registered in each developer portal matches the running build.

Package info

Package name
payload-social-auth
Latest version
1.0.0
Unpacked size
127 kB
License
MIT
Last publish
May 6, 2026

More from Mhmod-Hsn

View profile

Similar plugins

More in Auth