Skip to content

Commit 9c0a550

Browse files
committed
Supports ephemeralWebBrowserSession on iOS 13
Hello, Actually, on iOS 12+, when you login, the cookie is kept until the app is killed. Since iOS 13 it's possible to make session ephemeral. With this option prefersEphemeralWebBrowserSession, the cookie is killed when tab browser is closed. Pros : - no need to logout manualy users (for account switch for example) Cons : - user should reconnect each time the tab is presented. It fix #76 , on iOS 13. TODO : Improvement : make this parameter as an option Best Regards
1 parent 9b88c50 commit 9c0a550

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ios/RNInAppBrowser.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ + (BOOL)requiresMainQueueSetup
9292
initWithURL:url
9393
callbackURLScheme:redirectURL
9494
completionHandler:completionHandler];
95+
96+
if (@available(iOS 13.0, *)) {
97+
webAuthSession.prefersEphemeralWebBrowserSession = true;
98+
}
9599
} else {
96100
authSession = [[SFAuthenticationSession alloc]
97101
initWithURL:url

0 commit comments

Comments
 (0)