From 2f1a8cbd506b25020ee8d807640ce6f5a0f0e468 Mon Sep 17 00:00:00 2001 From: David Mulder Date: Tue, 14 May 2024 13:48:33 -0600 Subject: [PATCH 1/2] Revert "When MFA fails with an error, parse the response" This always forces the fail case if 'error_description' doesn't exist (fails every time the request succeeds). This reverts commit 0f96d070382ffed9e2bd295213b5ff25197047d9. --- src/auth.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/auth.rs b/src/auth.rs index ca79e6c..05ab274 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -1533,14 +1533,8 @@ impl PublicClientApplication { let (_, code) = url.query_pairs() .find(|(k, _)| k == "code") - .ok_or(MsalError::RequestFailed( - url.query_pairs() - .find(|(k, _)| k == "error_description") - .ok_or(MsalError::InvalidParse( - "Authorization code missing from redirect".to_string(), - ))? - .1 - .to_string(), + .ok_or(MsalError::InvalidParse( + "Authorization code missing from redirect".to_string(), ))?; Ok(code.to_string()) } else { From 61a67a37e2f945a0e83a1a3567ec5f7cda6703d9 Mon Sep 17 00:00:00 2001 From: David Mulder Date: Tue, 14 May 2024 13:51:13 -0600 Subject: [PATCH 2/2] Version 0.1.24 Signed-off-by: David Mulder --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6b2b3ee..474913e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "msal" description = "Microsoft Authentication Library for Rust" -version = "0.1.23" +version = "0.1.24" edition = "2021" authors = [ "David Mulder "