mirror of https://github.com/M66B/FairEmail.git
Add token expiration time to auth fail exceptions
This commit is contained in:
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…
Reference in New Issue