Having issue with how auth0 handles concurrent token call

when trigger token call having issue if there already ongoing token call is there, is just don’s last call and wait for first call only and return same value for both call

using this getAccessTokenSilently methods, changes custom_key value for both the call

Hi @ikhan

Welcome to the Auth0 Community!

Please allow us some time to research on the matter and we will be back with more information to guide you as soon as possible.

Best regards,
Gerald

Hi there,

Thank you for your patience!

My understanding is that you are having issues with the getAccessTokenSilently method, where multiple calls are made and you are trying to pass custom_key values that get ignored.

The getAccessTokenSilently method relies on cached tokens and attempts to use those if the token has not expired, without user interaction. Passing dynamic parameters such as custom_key should be added during the login flow or through an Action instead of being passed as a parameter within getAccessTokenSilently.

I believe the following post on GitHub related to the getAccessTokenSilently method for multiple audiences should provide additional information on this matter, if it suits your use case.

Hope this helped!
Gerald