Attempt to fix facebook login (#10152) [deploy]

* Attempt to fix facebook login

* Use token parse in the setup lambda
This commit is contained in:
Josh Puetz 2020-09-02 10:02:32 -05:00 committed by GitHub
parent a6d01f3215
commit f82ea80fcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,7 @@ end
FACEBOOK_OMNIAUTH_SETUP = lambda do |env|
env["omniauth.strategy"].options[:client_id] = SiteConfig.facebook_key
env["omniauth.strategy"].options[:client_secret] = SiteConfig.facebook_secret
env["omniauth.strategy"].options[:token_params][:parse] = :json
end
Devise.setup do |config|
@ -298,7 +299,7 @@ Devise.setup do |config|
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# Fun fact, if this is reordered to have Twitter first, it doesn't work for some reason.
# Fun fact, unless Twitter is last, it doesn't work for some reason.
config.omniauth :facebook, setup: FACEBOOK_OMNIAUTH_SETUP
config.omniauth :github, setup: GITHUB_OMNIUATH_SETUP
config.omniauth :twitter, setup: TWITTER_OMNIAUTH_SETUP