xpointo / silverstripe-google-authenticator
Adds Google authentication to SilverStripe
Installs: 431
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 5
Forks: 3
Open Issues: 3
Type:silverstripe-module
Requires
- php: >=5.3.0
- google/apiclient: 1.1.*
- silverstripe/framework: >=3.1
This package is not auto-updated.
Last update: 2025-04-26 19:24:04 UTC
README
Introduction
This module enables Google authentication on SilverStripe.
It works by matching the email address obtained from Google login with the email address in the SilverStripe user account list, and logs in the user if there is a match.
Requirements
Installation
via composer
composer require "xpointo/silverstripe-google-authenticator:dev-master"
Configuration
- Obtain the Google OAuth Client ID & Client Secret by following the instructions in the Google API Documentation
- For the redirect uris setting in the Google OAuth configuration, please include the URL:
http://[yoursitename]/GoogleAuthenticatorController/callback
- Define the Google OAuth Client ID & Client Secret in your
_ss_environment.php
ormysite/config.php
file.
define('GOOGLE_AUTHENTICATOR_CLIENT_ID', '[google-oauth-client-id]'); define('GOOGLE_AUTHENTICATOR_CLIENT_SECRET', '[google-oauth-client-secret]');