Make Devise find the strategy class automatically
Since we're already setting `wordpress_oauth2` using the `option :name` command in the `OmniAuth::Strategies::Wordpress` class, Devise can automatically find the strategy. However, it wasn't working because we were passing a string instead of a symbol.
This commit is contained in:
@@ -284,7 +284,6 @@ Devise.setup do |config|
|
|||||||
config.omniauth :wordpress_oauth2,
|
config.omniauth :wordpress_oauth2,
|
||||||
Rails.application.secrets.wordpress_oauth2_key,
|
Rails.application.secrets.wordpress_oauth2_key,
|
||||||
Rails.application.secrets.wordpress_oauth2_secret,
|
Rails.application.secrets.wordpress_oauth2_secret,
|
||||||
strategy_class: OmniAuth::Strategies::Wordpress,
|
|
||||||
client_options: { site: Rails.application.secrets.wordpress_oauth2_site },
|
client_options: { site: Rails.application.secrets.wordpress_oauth2_site },
|
||||||
setup: OmniauthTenantSetup.wordpress_oauth2
|
setup: OmniauthTenantSetup.wordpress_oauth2
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ require "omniauth-oauth2"
|
|||||||
module OmniAuth
|
module OmniAuth
|
||||||
module Strategies
|
module Strategies
|
||||||
class Wordpress < OmniAuth::Strategies::OAuth2
|
class Wordpress < OmniAuth::Strategies::OAuth2
|
||||||
option :name, "wordpress_oauth2"
|
option :name, :wordpress_oauth2
|
||||||
|
|
||||||
option :client_options, {}
|
option :client_options, {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user