summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGotenXiao <me@gotenxiao.co.uk>2019-02-06 16:48:36 +0000
committerNick Thomas <nick@gitlab.com>2019-02-06 16:48:36 +0000
commit7a1c810dc90080531e90cec68da37173988a2ec5 (patch)
treec5f2a6ea3da80e7aa00b49e62404862c5c97d79d /lib
parent20c83bbdb0a9729a308957397b37a2569486116f (diff)
downloadgitlab-ce-7a1c810dc90080531e90cec68da37173988a2ec5.tar.gz
Fix #44332 - Add support for profile and email
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/auth.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb
index 7aa02009aa0..b2ef04d23d7 100644
--- a/lib/gitlab/auth.rb
+++ b/lib/gitlab/auth.rb
@@ -12,6 +12,9 @@ module Gitlab
# Scopes used for OpenID Connect
OPENID_SCOPES = [:openid].freeze
+ # OpenID Connect profile scopes
+ PROFILE_SCOPES = [:profile, :email].freeze
+
# Default scopes for OAuth applications that don't define their own
DEFAULT_SCOPES = [:api].freeze
@@ -284,7 +287,7 @@ module Gitlab
# Other available scopes
def optional_scopes
- available_scopes + OPENID_SCOPES - DEFAULT_SCOPES
+ available_scopes + OPENID_SCOPES + PROFILE_SCOPES - DEFAULT_SCOPES
end
def registry_scopes