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

Support multiple devise models #192

Open
bilouw opened this issue Mar 2, 2023 · 0 comments
Open

Support multiple devise models #192

bilouw opened this issue Mar 2, 2023 · 0 comments

Comments

@bilouw
Copy link

bilouw commented Mar 2, 2023

Hi !

My Rails app use devise and doorkeeper. My app have 2 (in fact 3, but let begin with 2) devise model: User and Customer.

Doorkeeper by default handle only one devise model. By that, i mean that generators and example are based on use case with only one devise model.

With some controllers override, we can make doorkeeper handle multiples devise models.

Now, i have the same problem with this gem. I found a workaround (the same thing i did with doorkeeper), but i want to know if there is a legacy way to do that, or if an PR could be done to handle that.

Let me explain: When i want to access the /.well-known/openid-configuration url, the DiscoveryController try to build the json object with some hardcoded helpers:

image

Because i have two devise model (in two namespaces), these helpers methods does not exists for me.
What i did: Override the DiscoveryController in each of my namespaces, then override the provider_response methods to correct the helpers methods.

For now, that work !

But want to know if anybody have already handle this use case or if there is a best practice to handle this case.

Thanks !

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

1 participant