mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
OAuth requires provider definition
This commit is contained in:
parent
95b411f5c2
commit
3b1ba8cd7b
1 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ public class ServiceAuthenticator extends Authenticator {
|
|||
}
|
||||
|
||||
String refreshToken(boolean expire) throws AuthenticatorException, OperationCanceledException, IOException, JSONException, MessagingException {
|
||||
if (auth == AUTH_TYPE_GMAIL) {
|
||||
if (auth == AUTH_TYPE_GMAIL && provider != null) {
|
||||
GmailState authState = GmailState.jsonDeserialize(password);
|
||||
authState.refresh(context, user, expire, keep_alive);
|
||||
Long expiration = authState.getAccessTokenExpirationTime();
|
||||
|
@ -102,7 +102,7 @@ public class ServiceAuthenticator extends Authenticator {
|
|||
}
|
||||
|
||||
return authState.getAccessToken();
|
||||
} else if (auth == AUTH_TYPE_OAUTH) {
|
||||
} else if (auth == AUTH_TYPE_OAUTH && provider != null) {
|
||||
AuthState authState = AuthState.jsonDeserialize(password);
|
||||
OAuthRefresh(context, provider, authState, expire, keep_alive);
|
||||
Long expiration = authState.getAccessTokenExpirationTime();
|
||||
|
|
Loading…
Reference in a new issue