Skip to content

Commit

Permalink
Supports ephemeralWebBrowserSession on iOS 13
Browse files Browse the repository at this point in the history
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
  • Loading branch information
avenner committed Feb 11, 2020
1 parent 9b88c50 commit 9c0a550
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ios/RNInAppBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ + (BOOL)requiresMainQueueSetup
initWithURL:url
callbackURLScheme:redirectURL
completionHandler:completionHandler];

if (@available(iOS 13.0, *)) {
webAuthSession.prefersEphemeralWebBrowserSession = true;
}
} else {
authSession = [[SFAuthenticationSession alloc]
initWithURL:url
Expand Down

0 comments on commit 9c0a550

Please sign in to comment.