attempt to fix the discourse callback URL
This commit is contained in:
parent
4ea5fb0892
commit
89de647968
2 changed files with 11 additions and 7 deletions
7
Gemfile
7
Gemfile
|
|
@ -38,13 +38,12 @@ gem 'rails-i18n'
|
||||||
gem 'devise'
|
gem 'devise'
|
||||||
gem 'devise_ichain_authenticatable'
|
gem 'devise_ichain_authenticatable'
|
||||||
|
|
||||||
# for openID authentication
|
|
||||||
gem 'omniauth'
|
gem 'omniauth'
|
||||||
|
gem 'omniauth-google-oauth2'
|
||||||
|
gem 'omniauth-discourse'
|
||||||
|
# gem 'omniauth-openid'
|
||||||
# gem 'omniauth-facebook'
|
# gem 'omniauth-facebook'
|
||||||
# gem 'omniauth-github'
|
# gem 'omniauth-github'
|
||||||
gem 'omniauth-google-oauth2'
|
|
||||||
# gem 'omniauth-openid'
|
|
||||||
gem 'omniauth-discourse'
|
|
||||||
|
|
||||||
# Bot-filtering
|
# Bot-filtering
|
||||||
gem 'recaptcha', require: 'recaptcha/rails'
|
gem 'recaptcha', require: 'recaptcha/rails'
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,19 @@ Devise.setup do |config|
|
||||||
# Pass each provider to User model in :omniauth_providers (for open_id providers use their name)
|
# Pass each provider to User model in :omniauth_providers (for open_id providers use their name)
|
||||||
|
|
||||||
# config.omniauth :open_id, name: 'suse', identifier: 'http://www.opensuse.org/openid/user'
|
# config.omniauth :open_id, name: 'suse', identifier: 'http://www.opensuse.org/openid/user'
|
||||||
|
|
||||||
config.omniauth :google_oauth2, (ENV['OSEM_GOOGLE_KEY'] || Rails.application.secrets.google_key), (ENV['OSEM_GOOGLE_SECRET'] || Rails.application.secrets.google_secret),
|
config.omniauth :google_oauth2, (ENV['OSEM_GOOGLE_KEY'] || Rails.application.secrets.google_key), (ENV['OSEM_GOOGLE_SECRET'] || Rails.application.secrets.google_secret),
|
||||||
name: 'google',
|
name: 'google',
|
||||||
scope: 'email'
|
scope: 'email'
|
||||||
# config.omniauth :facebook, (ENV['OSEM_FACEBOOK_KEY'] || Rails.application.secrets.facebook_key), (ENV['OSEM_FACEBOOK_SECRET'] || Rails.application.secrets.facebook_secret)
|
|
||||||
# config.omniauth :github, (ENV['OSEM_GITHUB_KEY'] || Rails.application.secrets.github_key), (ENV['OSEM_GITHUB_SECRET'] || Rails.application.secrets.github_secret)
|
|
||||||
config.omniauth :discourse,
|
config.omniauth :discourse,
|
||||||
sso_url: "https://forum.snap.berkeley.edu/session/sso_provider",
|
sso_url: "https://forum.snap.berkeley.edu/session/sso_provider",
|
||||||
sso_secret: ENV['OSEM_DISCOURSE_SECRET']
|
sso_secret: ENV['OSEM_DISCOURSE_SECRET'],
|
||||||
|
callback_url: user_discourse_omniauth_callback
|
||||||
|
|
||||||
|
# config.omniauth :facebook, (ENV['OSEM_FACEBOOK_KEY'] || Rails.application.secrets.facebook_key), (ENV['OSEM_FACEBOOK_SECRET'] || Rails.application.secrets.facebook_secret)
|
||||||
|
# config.omniauth :github, (ENV['OSEM_GITHUB_KEY'] || Rails.application.secrets.github_key), (ENV['OSEM_GITHUB_SECRET'] || Rails.application.secrets.github_secret)
|
||||||
|
|
||||||
# ==> Mailer Configuration
|
# ==> Mailer Configuration
|
||||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||||
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue