force Realm Kotlin user client side to re-login when revoking a User’s Sessions from App Services UI I tried many times to force the user from the client side to re-login when the token expired or the user revoked from the server side. when a token changes in the App service the user should
re-login
var app by mutableStateOf( App.create(“appid”))
val anonymousCredentials = Credentials.anonymous(reuseExisting = true)
user = app.login(anonymousCredentials)
if (user?.loggedIn==true)
{
// print ok
}else
{
//The user should log in
}
this code does not work if there is any change with the server side like revoking the use session or disabling the user