Skip to content

Commit 85f1ce6

Browse files
valentinreyValentin Rey Rosell
and
Valentin Rey Rosell
authored
fix(getCustomBrowser): explicitly set browser to nil if type not found (#1064)
Co-authored-by: Valentin Rey Rosell <[email protected]>
1 parent ab4f53f commit 85f1ce6

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.changeset/nervous-donuts-relate.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-native-app-auth': patch
3+
---
4+
5+
#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.

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ android/gradle/
3333
android/gradlew
3434
android/gradlew.bat
3535

36+
# Android/Eclipse
37+
#
38+
android/.settings/
39+
3640
# node.js
3741
#
3842
node_modules/

packages/react-native-app-auth/ios/RNAppAuth.m

+3
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,9 @@ - (NSString*)getErrorCode: (NSError*) error defaultCode: (NSString *) defaultCod
717717
}
718718
};
719719
BrowserBlock browser = browsers[browserType];
720+
if (!browser) {
721+
return nil;
722+
}
720723
return browser();
721724
}
722725
#endif

0 commit comments

Comments
 (0)