omniauth_openid_connect
omniauth_openid_connect copied to clipboard
multiple open_id providers with devise
The doc says:
NOTE: if you use this gem with Devise you should use :openid_connect name, or Devise would route to 'users/auth/:provider' rather than 'users/auth/openid_connect'
this means that I cannot use more openid providers when using Devise?
thank you
There should be hints here: https://github.com/betagouv/civilsdeladefense/pull/782
Not sure how they make it work since they use devise and also use custom name provider
You can have however many providers you'd like (we have 3). In config/initializers/devise.rb
:
config.omniauth(
:openid_connect,
name: :your_provider_name,
issuer: YOUR_PROVIDER_ISSUER_URL,
discovery: true,
# other options you may need
client_options: {
identifier: YOUR_CLIENT_ID,
secret: YOUR_CLIENT_SECRET,
},
)
This will use the name
option to route to /users/auth/:provider
like /users/auth/your_provider_name