Skip to content

Support multiple devise models #192

@bilouw

Description

@bilouw

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 !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions