使用 omniauth-saml 进行设计的配置

configuration for devise with 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 的设备有什么好的配置吗?

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'