Commit 2c97f5d6 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Merge branch 'fix_google_oauth_gem' into 'master'

Update omniauth-google-oauth2 gem

#### What does this MR do?

This PR updates google omniauth gem.

#### Why was this MR needed?

This is needed, because google deprecates some API on Sept, 1st.

All tests pass, but I still have to ~~test and update documentation in https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/google.md~~

**Contacts API" and "Google+ API need to be enabled**

This need to be stated in the update guide (7.1 to 7.2), as well as (6.0 to 7.2)

This fixes #512

See merge request !171
parents 39464857 794a8d81
......@@ -129,7 +129,7 @@ GEM
factory_girl_rails (4.3.0)
factory_girl (~> 4.3.0)
railties (>= 3.0.0)
faraday (0.8.8)
faraday (0.8.9)
multipart-post (~> 1.2.0)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
......@@ -234,7 +234,7 @@ GEM
activesupport (>= 4.0.1)
haml (>= 3.1, < 5.0)
railties (>= 4.0.1)
hashie (2.0.5)
hashie (2.1.2)
hike (1.2.3)
hipchat (0.14.0)
httparty
......@@ -243,7 +243,7 @@ GEM
httparty (0.13.0)
json (~> 1.8)
multi_xml (>= 0.5.2)
httpauth (0.2.0)
httpauth (0.2.1)
i18n (0.6.11)
ice_nine (0.10.0)
jasmine (2.0.2)
......@@ -264,7 +264,7 @@ GEM
jquery-ui-rails (4.2.1)
railties (>= 3.2.16)
json (1.8.1)
jwt (0.1.8)
jwt (0.1.13)
multi_json (>= 1.5)
kaminari (0.15.1)
actionpack (>= 3.0.0)
......@@ -311,9 +311,9 @@ GEM
omniauth-github (1.1.1)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.1)
omniauth-google-oauth2 (0.2.1)
omniauth (~> 1.0)
omniauth-oauth2
omniauth-google-oauth2 (0.2.5)
omniauth (> 1.0)
omniauth-oauth2 (~> 1.1)
omniauth-oauth (1.0.1)
oauth
omniauth (~> 1.0)
......
......@@ -2,17 +2,21 @@
To enable the Google OAuth2 OmniAuth provider you must register your application with Google. Google will generate a client ID and secret key for you to use.
1. Sign in to the [Google Developers Console](https://console.developers.google.com/) with the Google account you want to use to register GitLab.
1. Sign in to the [Google Developers Console](https://console.developers.google.com/) with the Google account you want to use to register GitLab.
1. Select "Create Project".
1. Provide the project information
- Project name: 'GitLab' works just fine here.
- Project name: 'GitLab' works just fine here.
- Project ID: Must be unique to all Google Developer registered applications. Google provides a randomly generated Project ID by default. You can use the randomly generated ID or choose a new one.
1. Refresh the page. You should now see your new project in the list. Click on the project.
1. Select "APIs & auth" in the left menu.
1. Select "APIs" in the submenu.
- Enable `Contacts API`
- Enable `Google+ API`
1. Select "Credentials" in the submenu.
1. Select "Create New Client ID".
......@@ -41,7 +45,7 @@ To enable the Google OAuth2 OmniAuth provider you must register your application
args: { access_type: 'offline', approval_prompt: '' } }
```
1. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7.
1. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7.
1. Change 'YOUR APP SECRET' to the client secret from the GitHub application page from step 7.
......@@ -51,12 +55,12 @@ To enable the Google OAuth2 OmniAuth provider you must register your application
On the sign in page there should now be a Google icon below the regular sign in form. Click the icon to begin the authentication process. Google will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in.
## Further Configuration
## Further Configuration
This further configuration is not required for Google authentication to function but it is strongly recommended. Taking these steps will increase usability for users by providing a little more recognition and branding.
At this point, when users first try to authenticate to your GitLab installation with Google they will see a generic application name on the prompt screen. The prompt informs the user that "Project Default Service Account" would like to access their account. "Project Default Service Account" isn't very recognizable and may confuse or cause users to be concerned. This is easily changeable.
1. Select 'Consent screen' in the left menu. (See steps 1, 4 and 5 above for instructions on how to get here if you closed your window).
1. Scroll down until you find "Product Name". Change the product name to something more descriptive.
1. Scroll down until you find "Product Name". Change the product name to something more descriptive.
1. Add any additional information as you wish - homepage, logo, privacy policy, etc. None of this is required, but it may help your users.
......@@ -84,7 +84,7 @@ sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites
## 6. Update config files
TIP: to see what changed in gitlab.yml.example in this release use next command:
TIP: to see what changed in gitlab.yml.example in this release use next command:
```
git diff 6-0-stable:config/gitlab.yml.example 7-2-stable:config/gitlab.yml.example
......@@ -129,6 +129,12 @@ To make sure you didn't miss anything run a more thorough check with:
If all items are green, then congratulations upgrade complete!
## 10. Update OmniAuth configuration
When using Google omniauth login, changes of the Google account required.
Ensure that `Contacts API` and the `Google+ API` are enabled in the [Google Developers Console](https://console.developers.google.com/).
More details can be found at the [integration documentation](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/google.md).
## Things went south? Revert to previous version (6.0)
### 1. Revert the code to the previous version
......@@ -144,4 +150,4 @@ sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
## Login issues after upgrade?
If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page)
If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page)
......@@ -91,6 +91,12 @@ To make sure you didn't miss anything run a more thorough check with:
If all items are green, then congratulations upgrade is complete!
### 8. Update OmniAuth configuration
When using Google omniauth login, changes of the Google account required.
Ensure that `Contacts API` and the `Google+ API` are enabled in the [Google Developers Console](https://console.developers.google.com/).
More details can be found at the [integration documentation](../integration/google.md).
## Things went south? Revert to previous version (7.1)
### 1. Revert the code to the previous version
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment