Gem update google_oauth2
Summary
device_id
and device_name
arguments are ignored by the google_oauth2
omniauth provider.
Steps to reproduce
Setup omniauth and try to use the follow args:
gitlab_rails['omniauth_providers'] = [
{
"name" => "google_oauth2",
"app_id" => "id here",
"app_secret" => "secret here",
"args" => { "access_type" => "offline", "approval_prompt" => "auto", "hd": "yourdomain.com", "device_id": "1", "device_name": "computer" }
}
]
device_id
and device_name
get dropped from the params.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 9.1 Current User: git Using RVM: no Ruby Version: 2.3.3p222 Gem Version: 2.6.6 Bundler Version:1.13.7 Rake Version: 10.5.0 Redis Version: 3.2.5 Git Version: 2.13.4 Sidekiq Version:5.0.0 Go Version: unknownGitLab information Version: 9.4.5 Revision: 140292e Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://10.150.0.10 HTTP Clone URL: https://10.150.0.10/some-group/some-project.git SSH Clone URL: git@10.150.0.10:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers: google_oauth2
GitLab Shell Version: 5.3.1 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 5.3.1 ? ... OK (5.3.1) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 3/1 ... repository is empty 4/2 ... ok 4/3 ... ok 1/4 ... repository is empty 1/5 ... repository is empty 1/6 ... ok 1/7 ... ok 1/8 ... ok 1/9 ... ok 1/10 ... ok 1/11 ... repository is empty 1/12 ... ok 1/13 ... ok 1/14 ... ok 1/15 ... ok 1/16 ... repository is empty 1/17 ... ok 1/18 ... ok 1/19 ... ok 1/20 ... ok 1/21 ... repository is empty 1/22 ... repository is empty 1/23 ... ok 1/24 ... ok 1/25 ... ok 1/26 ... ok 1/27 ... ok 1/28 ... repository is empty 6/29 ... ok 7/30 ... ok 7/31 ... repository is empty 7/32 ... repository is empty 7/33 ... repository is empty 7/34 ... repository is empty Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Access to /var/opt/gitlab/.ssh/authorized_keys: OK Send ping to redis server: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 3/1 ... yes 4/2 ... yes 4/3 ... yes 1/4 ... yes 1/5 ... yes 1/6 ... yes 1/7 ... yes 1/8 ... yes 1/9 ... yes 1/10 ... yes 1/11 ... yes 1/12 ... yes 1/13 ... yes 1/14 ... yes 1/15 ... yes 1/16 ... yes 1/17 ... yes 1/18 ... yes 1/19 ... yes 1/20 ... yes 1/21 ... yes 1/22 ... yes 1/23 ... yes 1/24 ... yes 1/25 ... yes 1/26 ... yes 1/27 ... yes 1/28 ... yes 6/29 ... yes 7/30 ... yes 7/31 ... yes 7/32 ... yes 7/33 ... yes 7/34 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.3) Git version >= 2.7.3 ? ... yes (2.13.4) Active users: ... 5
Checking GitLab ... Finished
Possible fixes
I sent a PR to the library you're using: https://github.com/zquestz/omniauth-google-oauth2/pull/291 and it was merged into master, so I think you just need to update the version of omniauth-google-oauth2 included in GitLab