2017-02-24 122 views
0

配置後,我試着啓動服務器並說:用omniauth -saml設計配置

錯誤的OmniAuth配置。如果您收到此異常,這意味着要麼:

You are manually setting OmniAuth.config.path_prefix and it doesn't match the Devise one 
You are setting :omniauthable in more than one model 
You changed your Devise routes/OmniAuth setting and haven't restarted your server my-profile-configuration/gems/devise-3.2.4/lib/devise/rails/routes.rb:471:in `set_omniauth_path_prefix! 

我有這對我的用戶模型

devise :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable, :database_authenticatable, :omniauthable, :omniauth_providers => [:saml] 

我按照說明包括當它說按照omniauth Facebook的例子,得到了這一點。會做什麼?

帶有SAML的設備的任何良好配置?

回答

0

配置/初始化/ devise.rb取消註釋底部一行說像:

# When using omniauth, Devise cannot automatically set Omniauth path, 
# so you need to do it manually. For the users scope, it would be: 
# config.omniauth_path_prefix = '/api/users/auth'