summaryrefslogtreecommitdiff
path: root/docs/google-authentication.markdown
blob: 0f4f3ec19e71f39a9e6e563d9c11e2ea170db433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Google Authentication
=====================

Requirements
------------

OAuth Google API credentials (available in the Google Developer Console)

How does this work?
-------------------

- The Google authentication in Kanboard use the OAuth 2.0 protocol
- Any user account in Kanboard can be linked to a Google Account
- When a Kanboard user account is linked to Google, you can login with one click

Procedure to link a Google Account
----------------------------------

1. Go to your user profile
2. Click on **External accounts**
3. Click on the link **Link my Google Account**
4. You are redirected to the **Google Consent screen**
5. Authorize Kanboard by clicking on the button **Accept**
6. Your account is now linked

Now, on the login page you can be authenticated in one click with the link **Login with my Google Account**.

Your name and email are automatically updated from your Google Account.

Installation instructions
-------------------------

### Setting up OAuth 2.0 in Google Developer Console

- Follow the [official Google documentation](https://developers.google.com/accounts/docs/OAuth2Login#appsetup) to create a new application
- In Kanboard, you can get the **redirect url** in **Settings > Integrations > Google Authentication**

### Setting up Kanboad

Create a custom `config.php` file or copy the `config.default.php` file:

```php
<?php

// Enable/disable Google authentication
define('GOOGLE_AUTH', true); // Set this value to true

// Google client id (Get this value from the Google developer console)
define('GOOGLE_CLIENT_ID', 'YOUR_CLIENT_ID');

// Google client secret key (Get this value from the Google developer console)
define('GOOGLE_CLIENT_SECRET', 'YOUR_CLIENT_SECRET');
```

Notes
-----

Kanboard use these information from your Google profile:

- Full name
- Email address
- Google unique id

The Google unique id is used to link together the local user account and the Google account.