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

Manage each token within a separate process #13

Open
dallagi opened this issue Apr 2, 2021 · 0 comments
Open

Manage each token within a separate process #13

dallagi opened this issue Apr 2, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@dallagi
Copy link
Member

dallagi commented Apr 2, 2021

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.

@dallagi dallagi added the enhancement New feature or request label Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant