From 65d19f552987dbf6f552a95b64e7e81fa3867bfd Mon Sep 17 00:00:00 2001 From: Stein Dekker Date: Thu, 19 Oct 2023 19:15:38 +0900 Subject: [PATCH] fix for: The signed in account does not match with the provided account (#35) * fix for: The signed in account does not match with the provided account * fix tests --- android/build.gradle | 2 +- .../nl/recognize/msauthplugin/MsAuthPlugin.java | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index c15923c..e050bac 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -63,7 +63,7 @@ allprojects { dependencies { implementation project(':capacitor-android') implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" - implementation "com.microsoft.identity.client:msal:4.1.0" + implementation "com.microsoft.identity.client:msal:4.9.0" testImplementation "org.json:json:20230227" testImplementation "org.mockito:mockito-inline:5.2.0" diff --git a/android/src/main/java/nl/recognize/msauthplugin/MsAuthPlugin.java b/android/src/main/java/nl/recognize/msauthplugin/MsAuthPlugin.java index 7e01f9e..cb7c9d4 100644 --- a/android/src/main/java/nl/recognize/msauthplugin/MsAuthPlugin.java +++ b/android/src/main/java/nl/recognize/msauthplugin/MsAuthPlugin.java @@ -65,7 +65,7 @@ public void login(final PluginCall call) { } ); } catch (Exception ex) { - Logger.error("Unable to login", ex); + Logger.error("Unable to login: " + ex.getMessage(), ex); call.reject("Unable to fetch access token."); } } @@ -159,10 +159,20 @@ private void acquireToken(ISingleAccountPublicClientApplication context, List