diff --git a/.changeset/nervous-donuts-relate.md b/.changeset/nervous-donuts-relate.md new file mode 100644 index 00000000..9345eb71 --- /dev/null +++ b/.changeset/nervous-donuts-relate.md @@ -0,0 +1,5 @@ +--- +'react-native-app-auth': patch +--- + +#1063 Updated getCustomBrowser: in RNAppAuth.m to explicitly check the return value of browser. If the value is not in the dictionary, it will return nil to trigger an ephemeral session. diff --git a/.gitignore b/.gitignore index e545102e..6edaa449 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,10 @@ android/gradle/ android/gradlew android/gradlew.bat +# Android/Eclipse +# +android/.settings/ + # node.js # node_modules/ diff --git a/packages/react-native-app-auth/ios/RNAppAuth.m b/packages/react-native-app-auth/ios/RNAppAuth.m index 938c045c..a4afddc6 100644 --- a/packages/react-native-app-auth/ios/RNAppAuth.m +++ b/packages/react-native-app-auth/ios/RNAppAuth.m @@ -717,6 +717,9 @@ - (NSString*)getErrorCode: (NSError*) error defaultCode: (NSString *) defaultCod } }; BrowserBlock browser = browsers[browserType]; + if (!browser) { + return nil; + } return browser(); } #endif