配置完成后,我尝试启动服务器并说:
错误的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 :(得分:2)
在 config / initializers / 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'