Logout outside React Component
lukasz-kowalski opened this issue · 2 comments
lukasz-kowalski commented
Hello, is there an option to logout user outside React? I need to logout after timeout (and reset timer when user makes any call to API), so I want to call the function inside my Axios instance, but Axios is outside Context, so clearly it's not possible to use useAuth hook. Can I logout user in different way?
simenandre commented
I'm not sure why you can't do this with the hook, but you can always pass your own UserManager
and run the functions outside React.
simenandre commented
Closing this now. If you have any more issues, feel free to reply and we'll have another go at it :)