From 2c87f0b6e1b7e0de4f09f95c9c19f17ac9bc2b97 Mon Sep 17 00:00:00 2001 From: Joshua Smith Date: Thu, 28 Oct 2021 13:36:39 -0300 Subject: [PATCH] fix: default broker_redirect_uri_registered to false --- android/src/main/java/com/reactnativemsal/RNMSALModule.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/src/main/java/com/reactnativemsal/RNMSALModule.java b/android/src/main/java/com/reactnativemsal/RNMSALModule.java index 3692344..d39965f 100644 --- a/android/src/main/java/com/reactnativemsal/RNMSALModule.java +++ b/android/src/main/java/com/reactnativemsal/RNMSALModule.java @@ -81,6 +81,12 @@ public void createPublicClientApplication(ReadableMap params, Promise promise) { // Account mode. Required to be MULTIPLE for this library msalConfigJsonObj.put("account_mode", "MULTIPLE"); + // If broker_redirect_uri_registered is not provided in androidConfigOptions, + // default it to false + if (!msalConfigJsonObj.has("broker_redirect_uri_registered")) { + msalConfigJsonObj.put("broker_redirect_uri_registered", false); + } + ReadableMap auth = params.getMap("auth"); // Authority