You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: