Skip to content

Manage each token within a separate process #13

@dallagi

Description

@dallagi

Currently auth0_ex spawns a single GenServer that takes care of storing, refreshing and serving all tokens.
This may bring some issues, as problems with a token may affect other tokens as well.

For instance, the first time a token is retrieved for a new audience the GenServer retrieves that token synchronously, hence delaying the processing of requests for any other token.

This could be fixed by having a GenServer for each token, with an entrypoint that dispaches requests to the correct GenServer according to the target audience.

Another nice effect of this approach is that it would make the code simpler and the responsibilities more well separated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions