Plus One for Craft CMS

Plus One is a Craft 6 plugin. Craft 6 is still in beta, and so is Plus One (6.0.0-beta.1) — try it on staging first and use caution on production sites.

Configuration

Everything on the settings page can be set in config/craft/plusone.php (values there override the page):

<?php

return [
    'providers' => [
        [
            'enabled' => true,
            'handle' => 'google',
            'driver' => 'google',
            'clientId' => '$GOOGLE_CLIENT_ID',
            'clientSecret' => '$GOOGLE_CLIENT_SECRET',
            'sites' => '*',
            'cp' => false,
            'newUsers' => 'default',   // default | allow | deny
            'linkByEmail' => false,
            'pkce' => true,
            'options' => 'param.prompt=select_account',
        ],
    ],
    'requireVerifiedEmail' => true,
    'allowedEmailDomains' => 'example.com',
    'defaultUserGroup' => 'members',
    'activateNewUsers' => true,
    'allowAdmins' => false,
    'frontEndLinking' => true,
    'sites' => [
        ['site' => 'default', 'loginPath' => 'login', 'accountPath' => 'account'],
    ],
];
SettingDefault
requireVerifiedEmailtrueRegister someone only when the provider verified their email.
allowedEmailDomainsblankRegister only these domains. Blank: any.
defaultUserGroupblankGroup handle new users join.
activateNewUserstrueActivate people Plus One registers (verified email only); otherwise they're left inactive for an admin.
allowAdminsfalseLet admins use social sign-in.
frontEndLinkingtrueFront-end connect/disconnect.

Registration rules apply to every OAuth provider, including oauthProviders in config/general.php. Whether someone may register at all is the provider's New users plus Craft's Allow public registration (Settings → Users).

More plugins

Pairs well with Plus One