innis-maggiore / silverstripe-google-auth
Authenticate CMS users with Google's Website Sign-in
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 1
Type:silverstripe-module
Requires
- google/apiclient: 2.2.1
- silverstripe/cms: 3.7.*
- silverstripe/framework: 3.7.*
This package is auto-updated.
Last update: 2023-04-25 23:51:47 UTC
README
Currently supports Silverstripe 3.x
To install:
composer require "innis-maggiore/silverstripe-google-auth"
YAML Configuration
GSuiteAuthExtension:
client_id:
'<YOUR ID>.apps.googleusercontent.com'
GSuiteAuthenticator:
domain:
'<yourdomain.com>'
create_new_users:
true
default_new_user_group:
'content-authors'
Enable the Authenticator
In your site's main _config.php
# You can (optionally) disable the stock Authenticator
Authenticator::unregister('MemberAuthenticator');
# Enable Google Authenticator
Authenticator::register_authenticator('GSuiteAuthenticator');
Note
The domain being used must be enabled in Google Developer Console for this to work. In Google Developer Console create your project, set up new credentials. Add your domain to "Authorized JavaScript origins".