Token refrech with @recognizebv/capacitor-plugin-msauth

Is there any documentation how to refresh expired token without a user interaction with plugin @recognizebv/capacitor-plugin-msauth ?

Looking at the repo for the project, it appears there is only a login and logout method.

BUT, looking at the Android code at least, it appears acquireToken which gets called by login, acquires a token silently if there is an active account in memory. So, it seems you just call login and the plugin will handle whether or not it needs to prompt the user for credentials again. Have you tried that?

When the login() is called after the token expiration - user is redirected to a login screen and the token refreshed when user picked the account and confirm the dialog.
So the user needs to interact to refresh the token…
Might be I am doing somethin wrong…

How long is a token good for? Maybe call login more often (every time the app opens or comes to the foreground?) so the token gets refreshed silently? I am just shooting in the dark here :slight_smile: I would reach out to the maintainer/creator in the repo for specific questions.