Skip to content
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

multiple open_id providers with devise #115

Open
masciugo opened this issue May 30, 2022 · 2 comments
Open

multiple open_id providers with devise #115

masciugo opened this issue May 30, 2022 · 2 comments

Comments

@masciugo
Copy link

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

@ssoulless
Copy link

ssoulless commented Jun 29, 2022

There should be hints here: Bureau-Systeme-d-Information-BSI/civilsdeladefense#782

Not sure how they make it work since they use devise and also use custom name provider

@JeanSebTr
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants