Simple Social Login

Adds Google and Microsoft (Entra ID) OAuth social login buttons to the Payload admin panel and authenticated collections.

Community 2 689/wk MIT v1.1.0

Installation

pnpm add payload-simple-social-login

About

This plugin brings OAuth social login to Payload CMS without replacing its default authentication. It wires Google and Microsoft (Entra ID) as providers and injects an "or login with" button row into the admin login form through Payload's `afterLogin` component slot. Behind the button it registers a login-start endpoint and an OAuth callback endpoint under `routes.api` for each enabled provider, so there is no separate auth server to host. User resolution is deliberately narrow. By default the plugin matches the OAuth profile email against `admin.user` (or any collection you list) and issues a standard Payload JWT cookie on success, then redirects into the admin panel. It respects `auth.verify`: a matched but unverified user is rejected with a toast unless you opt into `autoVerify`, which sets only `_verified` to true and continues. If you need provisioning or account linking, you supply a `findUserCallback` and the plugin steps out of the way entirely, including the verification check. Configuration is a single plugin call. You pass `clientId` and `clientSecret` per provider, optionally override the callback and login paths, set the Microsoft tenant (`common` by default), and list the auth collections to serve. The plugin never auto-creates users and does not store provider tokens, so IdP logout and token revocation are out of scope; Payload's own session logout is sufficient. The integration targets Payload 3.x, requires regenerating the admin import map so the client components resolve, and ships TypeScript types for the provider profiles (Google UserInfo and Microsoft Graph `/me`). Errors surface on the login form as `?ssl-error=` codes with toasts: `login`, `not-found`, and `unverified`.

Package info

Package name
payload-simple-social-login
Latest version
1.1.0
Unpacked size
148 kB
License
MIT
Weekly downloads
689
Last publish
Aug 27, 2026

Similar plugins

More in Auth