Created
March 16, 2023 12:46
-
-
Save ademar111190/e0ed3c45350bd9a4a23589522dcb83c6 to your computer and use it in GitHub Desktop.
Auth error diff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/android/app/src/main/java/com/breez/client/plugins/breez/breezlib/GoogleAuthenticator.java b/android/app/src/main/java/com/breez/client/plugins/breez/breezlib/GoogleAuthenticator.java | |
index 52319507..0b05f5b8 100644 | |
--- a/android/app/src/main/java/com/breez/client/plugins/breez/breezlib/GoogleAuthenticator.java | |
+++ b/android/app/src/main/java/com/breez/client/plugins/breez/breezlib/GoogleAuthenticator.java | |
@@ -90,22 +90,8 @@ public class GoogleAuthenticator implements PluginRegistry.ActivityResultListene | |
} catch (Exception e) { | |
Log.w(TAG, "getAccessToken failed", e); | |
if (e instanceof UserRecoverableAuthException) { | |
- Log.w(TAG, "getAccessToken failed but it is recoverable, trying to sign in again"); | |
- GoogleSignInAccount signInResult = Tasks.await(signIn()); | |
- | |
- try { | |
- credential.setSelectedAccount(signInResult.getAccount()); | |
- } catch (Exception ex) { | |
- Log.w(TAG, "setSelectedAccount failed in recoverable", ex); | |
- throw ex; | |
- } | |
- | |
- try { | |
- return credential.getToken(); | |
- } catch (Exception ex) { | |
- Log.w(TAG, "getAccessToken failed in recoverable", ex); | |
- throw ex; | |
- } | |
+ Log.w(TAG, "getAccessToken failed but it is recoverable, throw AuthError to try sign in again"); | |
+ throw new Exception("AuthError"); | |
} | |
throw e; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment