Add token expiration time to auth fail exceptions

pull/214/head
M66B 12 months ago
parent 37462d7da1
commit e52daaf895

@ -526,6 +526,12 @@ public class EmailService implements AutoCloseable {
msg != null && msg.endsWith("Invalid credentials (Failure)"))
msg += "\n" + context.getString(R.string.title_service_token);
if (auth == AUTH_TYPE_OAUTH) {
Long expiration = authenticator.getAccessTokenExpirationTime();
if (expiration != null && expiration < new Date().getTime())
msg = "Access token expired at " + new Date(expiration) + "\n" + msg;
}
Throwable c = ex1;
while (c != null) {
String m = c.getMessage();

Loading…
Cancel
Save