-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration with Devise #5
Comments
We have a project that uses a combination of Devise for native user auth, Google Omniauth and multi-provider SAML Omniauth. We don't configure omniauth via Devise but rather via a separate omniauth initializer that looks something like:
|
Ok. I think I am having the same problem as issue #4 with that though. When you say "Try updating the routes to include the metadata/SLO routes and pass the appropriate metadata/SLO options to OmniAuth::MultiProvider.register" I am not sure what that would look like. The metadata route for me (because of devise integration) would be |
if you're getting the I think the README example is a little off? Sticking that middleware in |
@sbauch Moving the config to initializers as you suggested made all the difference for me in fixing our devise - multi-provider integration. Thanks a lot! |
I just opened an issue that deals with devise. I'm getting a 404 error on the callback assertion. Is there something I'm missing in the routes you're supposed to create with this gem to get it to point to the devise omniauth controller? Seems like I'm so close. |
Is there a working example of omniauth-multi-provider being configured with Devise? I already have config.omniauth for other providers in initializers/devise.rb which adds omniauth middleware that would clash with the way this setup has the configuration in initializers/omniauth.rb. Based on working examples for other omniauth providers as well the configuration described here I would expect something like:
config.omniauth :multi_provider,
provider_name: :saml,
identity_provider_id_regex: /\d+/,
path_prefix: 'users/auth/saml',
name_identifier_format: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
issuer: issuer_url,
allowed_clock_drift: 5.seconds do |identity_provider_id, rack_env|
identity_provider = SAML::IdentityProvider.find(identity_provider_id)
rack_env['salsify.saml_identity_provider'] = identity_provider
identity_provider.options
end
This results in an error:
Devise::OmniAuth::StrategyNotFound: Could not find a strategy with name MultiProvider. Please ensure it is required or explicitly set it using the :strategy_class option.
:multi_provider is included in devise :omniauthable, omniauth_providers[] in user model. Anyone know of a solution?
The text was updated successfully, but these errors were encountered: