From eb9c5a8945de33f88b8366283663aff27d4bf7d1 Mon Sep 17 00:00:00 2001 From: Luca Calacci Date: Mon, 14 Mar 2022 13:48:34 +0100 Subject: [PATCH] v0.0.7 --- CHANGELOG.md | 5 +++++ example/pubspec.lock | 2 +- lib/web/B2CProviderWeb.dart | 3 +++ pubspec.yaml | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2433615..90197f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.0.7 +Bug fix: +* Web: solved issue when using REDIRECT method and user clicks forgot password and either INIT and PASSWORD_RESET callbacks are +triggered. Added session storage clean up before triggering PASSWORD_RESET callback to prevent interaction_in_progress MSAL error when calling the next authority. + ## 0.0.6 Bug fix: * Web: solved issue when user click back button from policy interactive that prevented further policies to be called diff --git a/example/pubspec.lock b/example/pubspec.lock index 9251621..9f7f943 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -68,7 +68,7 @@ packages: path: ".." relative: true source: path - version: "0.0.6" + version: "0.0.7" flutter_test: dependency: "direct dev" description: flutter diff --git a/lib/web/B2CProviderWeb.dart b/lib/web/B2CProviderWeb.dart index 2087c06..dfd22f7 100644 --- a/lib/web/B2CProviderWeb.dart +++ b/lib/web/B2CProviderWeb.dart @@ -163,10 +163,13 @@ class B2CProviderWeb { if (_lastHash != null && _lastHash != "#/") { if (_lastHash!.contains(_B2C_PASSWORD_CHANGE)) { + window.sessionStorage.removeWhere((key, value) => key.startsWith("msal")); + _emitCallback(B2COperationResult( tag, B2COperationSource.POLICY_TRIGGER_INTERACTIVE, B2COperationState.PASSWORD_RESET)); + return; } else { var result = await _b2cApp!.handleRedirectFuture(_lastHash); if (result != null) { diff --git a/pubspec.yaml b/pubspec.yaml index e3cd390..9964602 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_azure_b2c description: A flutter library to handle the Azure B2C authentication protocol -version: 0.0.6 +version: 0.0.7 homepage: "https://github.com/nodriver-ai/flutter_azure_b2c" environment: