forked from External/greenlight
GRN2-xx: Added option to specify different redirect url for google auth (#1016)
* Added option to specify different redirect url for google auth * Made the redirect url generic so it works with 365 Co-authored-by: Jesus Federico <jesus@123it.ca>
This commit is contained in:
parent
6bb831fb27
commit
3e7fb7ecc2
|
@ -46,12 +46,14 @@ Rails.application.config.middleware.use OmniAuth::Builder do
|
|||
scope: %w(profile email),
|
||||
access_type: 'online',
|
||||
name: 'google',
|
||||
redirect_uri: ENV['OAUTH2_REDIRECT'].presence || nil,
|
||||
setup: SETUP_PROC
|
||||
end
|
||||
if Rails.configuration.omniauth_office365
|
||||
Rails.application.config.providers << :office365
|
||||
|
||||
provider :office365, ENV['OFFICE365_KEY'], ENV['OFFICE365_SECRET'],
|
||||
redirect_uri: ENV['OAUTH2_REDIRECT'].presence || nil,
|
||||
setup: SETUP_PROC
|
||||
end
|
||||
end
|
||||
|
|
|
@ -44,6 +44,10 @@ OFFICE365_KEY=
|
|||
OFFICE365_SECRET=
|
||||
OFFICE365_HD=
|
||||
|
||||
# OAUTH2_REDIRECT allows you to specify the redirect_url passed to oauth on sign in.
|
||||
# It is useful for cases when Greenlight is deployed behind a Network Load Balancer or proxy
|
||||
OAUTH2_REDIRECT=
|
||||
|
||||
# LDAP Login Provider (optional)
|
||||
#
|
||||
# You can enable LDAP authentication by providing values for the variables below.
|
||||
|
|
Loading…
Reference in New Issue