I've tried the example project, made the necessary connection changes in the code and it worked perfectly.
Then added msal_mobile: ^0.1.4 to pubspec on my working project and added same connection details as before. But now it is failing to create instance of MsalMobile client object, with the following error.
I've confirmed multiple times, created new test project and also tried registering NewApplication on AzureAD but to no avail.
flutter --version
Flutter 1.20.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 216dee60c0 (2 weeks ago) • 2020-09-01 12:24:47 -0700
Engine • revision d1bc06f032
Tools • Dart 2.9.2
Connecting to VM Service at ws://127.0.0.1:61391/ZDMkGC4Keks=/ws D/EGL_emulation(19170): eglMakeCurrent: 0xf4b7e8c0: ver 2 0 (tinfo 0xe19a13a0) I/flutter (19170): fun() - initState D/eglCodecCommon(19170): setVertexArrayObject: set vao to 0 (0) 1 0 W/mple.StevensPi(19170): Accessing hidden field Lsun/misc/Unsafe;->theUnsafe:Lsun/misc/Unsafe; (greylist, reflection, allowed) W/mple.StevensPi(19170): Accessing hidden method Lsun/misc/Unsafe;->allocateInstance(Ljava/lang/Class;)Ljava/lang/Object; (greylist, reflection, allowed) D/AndroidRuntime(19170): Shutting down VM E/AndroidRuntime(19170): FATAL EXCEPTION: main E/AndroidRuntime(19170): Process: com.example.StevensPin, PID: 19170 **E/AndroidRuntime(19170): java.lang.IllegalStateException: The redirect URI in the configuration file doesn't match with the one generated with package name and signature hash. Please verify the uri in the config file and your app registration in Azure portal.** E/AndroidRuntime(19170): at com.microsoft.identity.client.PublicClientApplicationConfiguration.verifyRedirectUriWithAppSignature(PublicClientApplicationConfiguration.java:453) E/AndroidRuntime(19170): at com.microsoft.identity.client.PublicClientApplicationConfiguration.checkIntentFilterAddedToAppManifestForBrokerFlow(PublicClientApplicationConfiguration.java:471) E/AndroidRuntime(19170): at com.microsoft.identity.client.PublicClientApplication.initializeApplication(PublicClientApplication.java:1024) E/AndroidRuntime(19170): at com.microsoft.identity.client.PublicClientApplication.<init>(PublicClientApplication.java:1006) E/AndroidRuntime(19170): at com.microsoft.identity.client.SingleAccountPublicClientApplication.<init>(SingleAccountPublicClientApplication.java:80) E/AndroidRuntime(19170): at com.microsoft.identity.client.PublicClientApplication$2.onTaskCompleted(PublicClientApplication.java:881) E/AndroidRuntime(19170): at com.microsoft.identity.client.PublicClientApplication$2.onTaskCompleted(PublicClientApplication.java:870) E/AndroidRuntime(19170): at com.microsoft.identity.common.internal.controllers.CommandDispatcher$2.run(CommandDispatcher.java:179) E/AndroidRuntime(19170): at android.os.Handler.handleCallback(Handler.java:883) E/AndroidRuntime(19170): at android.os.Handler.dispatchMessage(Handler.java:100) E/AndroidRuntime(19170): at android.os.Looper.loop(Looper.java:214) E/AndroidRuntime(19170): at android.app.ActivityThread.main(ActivityThread.java:7356) E/AndroidRuntime(19170): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(19170): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) E/AndroidRuntime(19170): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) I/Process (19170): Sending signal. PID: 19170 SIG: 9 Lost connection to device. Exited (sigterm)
I've tried the example project, made the necessary connection changes in the code and it worked perfectly.
Then added msal_mobile: ^0.1.4 to pubspec on my working project and added same connection details as before. But now it is failing to create instance of MsalMobile client object, with the following error.
I've confirmed multiple times, created new test project and also tried registering NewApplication on AzureAD but to no avail.
flutter --version
Flutter 1.20.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 216dee60c0 (2 weeks ago) • 2020-09-01 12:24:47 -0700
Engine • revision d1bc06f032
Tools • Dart 2.9.2
Connecting to VM Service at ws://127.0.0.1:61391/ZDMkGC4Keks=/ws D/EGL_emulation(19170): eglMakeCurrent: 0xf4b7e8c0: ver 2 0 (tinfo 0xe19a13a0) I/flutter (19170): fun() - initState D/eglCodecCommon(19170): setVertexArrayObject: set vao to 0 (0) 1 0 W/mple.StevensPi(19170): Accessing hidden field Lsun/misc/Unsafe;->theUnsafe:Lsun/misc/Unsafe; (greylist, reflection, allowed) W/mple.StevensPi(19170): Accessing hidden method Lsun/misc/Unsafe;->allocateInstance(Ljava/lang/Class;)Ljava/lang/Object; (greylist, reflection, allowed) D/AndroidRuntime(19170): Shutting down VM E/AndroidRuntime(19170): FATAL EXCEPTION: main E/AndroidRuntime(19170): Process: com.example.StevensPin, PID: 19170 **E/AndroidRuntime(19170): java.lang.IllegalStateException: The redirect URI in the configuration file doesn't match with the one generated with package name and signature hash. Please verify the uri in the config file and your app registration in Azure portal.** E/AndroidRuntime(19170): at com.microsoft.identity.client.PublicClientApplicationConfiguration.verifyRedirectUriWithAppSignature(PublicClientApplicationConfiguration.java:453) E/AndroidRuntime(19170): at com.microsoft.identity.client.PublicClientApplicationConfiguration.checkIntentFilterAddedToAppManifestForBrokerFlow(PublicClientApplicationConfiguration.java:471) E/AndroidRuntime(19170): at com.microsoft.identity.client.PublicClientApplication.initializeApplication(PublicClientApplication.java:1024) E/AndroidRuntime(19170): at com.microsoft.identity.client.PublicClientApplication.<init>(PublicClientApplication.java:1006) E/AndroidRuntime(19170): at com.microsoft.identity.client.SingleAccountPublicClientApplication.<init>(SingleAccountPublicClientApplication.java:80) E/AndroidRuntime(19170): at com.microsoft.identity.client.PublicClientApplication$2.onTaskCompleted(PublicClientApplication.java:881) E/AndroidRuntime(19170): at com.microsoft.identity.client.PublicClientApplication$2.onTaskCompleted(PublicClientApplication.java:870) E/AndroidRuntime(19170): at com.microsoft.identity.common.internal.controllers.CommandDispatcher$2.run(CommandDispatcher.java:179) E/AndroidRuntime(19170): at android.os.Handler.handleCallback(Handler.java:883) E/AndroidRuntime(19170): at android.os.Handler.dispatchMessage(Handler.java:100) E/AndroidRuntime(19170): at android.os.Looper.loop(Looper.java:214) E/AndroidRuntime(19170): at android.app.ActivityThread.main(ActivityThread.java:7356) E/AndroidRuntime(19170): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(19170): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) E/AndroidRuntime(19170): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) I/Process (19170): Sending signal. PID: 19170 SIG: 9 Lost connection to device. Exited (sigterm)