Subversion Repositories oidplus

Rev

Rev 432 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
432 daniel-mar 1
 
2
How to setup Google Authentication
3
==================================
4
 
5
(1) You need a Google account
6
 
7
(2) Go to the Google Cloud Platform
8
    https://console.cloud.google.com/home/dashboard
9
 
10
    In this dashboard, create a new project.
11
    Wait until the project is created, and then switch to this project
12
    using the drop-down-box at the left top.
13
 
14
(3) Select Burger menu => API & Services => OAuth consent screen
15
 
16
    Choose "External", choose application title, etc.
17
 
18
(4) Select Burger menu => API & Services => Credentials
19
 
20
    Create a new "OAuth 2.0-Client-ID"
21
    - Application type: Web application
22
    - Name: OIDplus 2.0
23
    - Authorized JavaScript origins: None
24
    - Authorized redirect URIs:
25
      Add https://<Your OIDplus URL>/plugins/publicPages/810_login_google/oauth.php
26
 
27
    You will now receive a client ID and a client key (secret!)
28
 
29
(5) In userdata/baseconfig/config.inc.php, add following lines:
30
 
433 daniel-mar 31
	OIDplus::baseConfig()->setValue('GOOGLE_OAUTH2_ENABLED',       true);
32
	OIDplus::baseConfig()->setValue('GOOGLE_OAUTH2_CLIENT_ID',     '..............apps.googleusercontent.com');
33
	OIDplus::baseConfig()->setValue('GOOGLE_OAUTH2_CLIENT_SECRET', '.............');
432 daniel-mar 34
 
433 daniel-mar 35
(6) You might want to include a document in userdata/resources/ where you explain to your
36
    users that clicking the "Login using Google" link will redirect the user to
37
    Google in order to perform a login. During this login, Google will send the email address and
38
    the personal name of the user to OIDplus - nothing else.
39
    Note that the Google consent-screen will also have a privacy statement by Google.