Open sokratisvs opened 4 months ago
As we released v4 a couple weeks ago, can you try with using MGT v4 and see if you get the same error? Thanks!
Same error here, the loginFailed function does not catch the close popup event. I am using: @microsoft/mgt-react:4.2.1 @microsoft/mgt-element: 4.2.1 @microsoft/mgt-msal2-provider:4.2.1
Hi @sokratisvs. Any update with this bug?
Describe the bug Unhandled Promise rejection for initProvider in mgt-msal2-provider, when user cancels login flow in Popup
core.mjs:10614 ERROR Error: Uncaught (in promise): BrowserAuthError: user_cancelled: User cancelled the flow. BrowserAuthError: user_cancelled: User cancelled the flow. at BrowserAuthError.AuthError [as constructor] (AuthError.js:31:24) at new BrowserAuthError (BrowserAuthError.js:201:28) at BrowserAuthError.createUserCancelledError (BrowserAuthError.js:290:16) at PopupClient.js:295:45 at timer (zone.umd.js:2441:47) at _ZoneDelegate.invokeTask (zone.umd.js:445:35) at core.mjs:10757:55 at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:10757:36) at _ZoneDelegate.invokeTask (zone.umd.js:444:64) at Object.onInvokeTask (core.mjs:11070:33) at resolvePromise (zone.umd.js:1250:35) at zone.umd.js:1157:21 at zone.umd.js:1173:37 at rejected (Msal2Provider.js:11:89) at _ZoneDelegate.invoke (zone.umd.js:411:30) at Object.onInvoke (core.mjs:11083:33) at _ZoneDelegate.invoke (zone.umd.js:410:56) at Zone.run (zone.umd.js:165:47) at zone.umd.js:1314:38 at _ZoneDelegate.invokeTask (zone.umd.js:445:35)
To Reproduce Steps to reproduce the behavior:
Expected behavior The promise rejection should be handled
Screenshots![image](https://github.com/microsoftgraph/microsoft-graph-toolkit/assets/16580146/5f7b9d82-ff11-478b-a28b-4d76ef6ee431)
Environment (please complete the following information):