How to configure refresh of auth-cookie, or log out user when cookie has expired?
Details:
We are using Azure SWA with an Azure functions app running on dotnet 8 isolated as the backend api with C#. We are using a custom identity provider targeting microsoft entra version 1, like https://learn.microsoft.com/en-us/azure/static-web-apps/authentication-custom?tabs=aad%2Cfunction#configure-a-custom-identity-provider
We are using Microsoft.Graph v5.61.0 to retreive the roles. There is a posibility that this version of Microsoft.Graph has a bug as this is where the user roles are retrieved.
We are provided with a client principal that we can use to get custom roles, however the user claim has an expiration time of 1h, and this does not seem to be respected anywhere. I.e nothing special happens after 1h. Reloading the page, closing the page etc does not renew the user claims.
Further, after the user has been active for a long period of time (we have tried 24h) the client principal returned does not include the custom roles. The user is not logged out or otherwise unathenticated, even though the auth cookie should expire after a few hours according to the similar issue on github: https://github.com/Azure/static-web-apps/issues/213 (scroll down to see that the issue changes through the thread)
It is important that the custom roles can be returned even after the user has been logged in for 24h, hopefully this can be achieved by refreshing the auth cookie. Otherwise it would be acceptable if the user was logged out when the cookie has expired. How can we configure this?

