Select to view content in your preferred language

How to prevent callback of AuthenticationChallengeHandler listener getting triggered multiple times when access token expires?

455
0
04-30-2020 01:10 AM
BuddhaS
New Contributor

I am using ESRI online map in my project. To find a route and calculate the estimated time of arrival (ETA) of a place I am using ESRI RouteTask. I have implemented AuthenticationChallengeHandler in a service. The callback method handleChallenge of AuthenticationChallengeHandler gets triggered whenever an access token expires. Here we need to write logic to retrieve a new access token. But the problem is handleChallenge callback method sometimes gets triggered multiple times. This does not happen all the time. I could not find the exact scenario when it gets triggered multiple times. Is there any way to prevent multiple executions of the callback?

0 Kudos
0 Replies