I have modified the NuGet package provided LoginCallback.ashx with added retrieval of an API Delegation Token. I would like to update the delegation token if it has expired in both the current request and cookie/session for future requests. Is there any best practices or configurations I can use to “hook” this in so that a delegation token refreshes/renews itself automatically?
I would be extending the HttpClient and in that do above things, however, just checking if there’s anything I can do with the SDK or configurations since the cookie is set with this cookie handler/encryptor/method in LoginCallback.ashx;
Do I have to rebuild the cookie and set it with the same line of code or is there a better way? Have you built a wrapper to alleviate this functionality? Can it be done entirely in auth0 backend without having to touch this?
What we’re seeing is that the regular session token seems to get autorefreshed, but since the API delegation token isn’t refreshed as the refresh doesnt trigger or have a handler (if there even is a possibility of such) in the SDK so that it also gets a new delegation token. The delegation token has expired and the user sees nothing in the webapp because the api-token has expired.