I have an app using Oauth2 (Azure) where the tokens expire quite quickly.
If the code discovers a token is expired/unusable for one reason or another, I want to force a logout.
There doesn’t seem to be a “nice” way to accomplish this, but I am far from a Panel expert so I’m hoping for some hints
I’ve fixed it by making an invisible ReactiveHTML component with a value trigger that does window.location = '/logout'
(as well as a trigger if value > 0 on render to catch if it was expired before the app was served) and it works decently, but it feels somewhat hackish.
Another idea I threw around was having a reactivehtml component delete the cookies, then reload the page, but that’s not really particularly better.
Is there a better way to do it?