Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supports ephemeralWebBrowserSession on iOS 13 #141

Merged
merged 4 commits into from
Feb 19, 2020

Conversation

avenner
Copy link
Contributor

@avenner avenner commented Jan 22, 2020

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

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

@jdnichollsc
Copy link
Member

Is it possible to add a flag from iOS options in order to enable/disable this? What do you think?
Sorry for the delay and thanks for your help! <3

@jorgexgb
Copy link

@avenner have you found an iOS option for this? I can't find anything we can put on Info.plist.

+1 for the PR

@jdnichollsc
Copy link
Member

Guys, are you agree to merge this PR?

@avenner
Copy link
Contributor Author

avenner commented Feb 11, 2020

Sorry guys :

@jdnichollsc : very busy last time, I will try to add this as an option

Lasts commits was a mistake, will be cleaned soon, sorry for incovenience.

@jorgexgb
Copy link

@avenner no worries! thanks for the help.

@avenner
Copy link
Contributor Author

avenner commented Feb 11, 2020

@jorgexgb no need to add nothing in plist, need only to set the session as ephemeral ;)
But only working in iOS 13.

@avenner
Copy link
Contributor Author

avenner commented Feb 11, 2020

( mistake reverted, now looking to add this as an option... )

@avenner
Copy link
Contributor Author

avenner commented Feb 11, 2020

Done & tested.
Hope it will help !

@avenner avenner force-pushed the patch-1 branch 2 times, most recently from 6db3c61 to 51f0969 Compare February 11, 2020 18:28
@avenner
Copy link
Contributor Author

avenner commented Feb 11, 2020

(extra comma fixed)

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 proyecto26#76 , on iOS 13.

TODO : Improvement : make this parameter as an option 

Best Regards
@jorgexgb
Copy link

@avenner thanks!!!

@jorgexgb
Copy link

jorgexgb commented Feb 11, 2020

@avenner seems good! @jdnichollsc let us know if okay to merge

@avenner
Copy link
Contributor Author

avenner commented Feb 11, 2020

You are welcome @jorgexgb !

Please note that when this option is activated, there is no prompt before open auth ( "app" wants to use "example.com" ... )

@jorgexgb
Copy link

@avenner got it. That is totally fine!

Copy link
Member

@jdnichollsc jdnichollsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the name of the property, using "ephemeralWebSession" instead of "animated"

index.js Outdated Show resolved Hide resolved
Fix property name
@jdnichollsc
Copy link
Member

@jdnichollsc jdnichollsc merged commit 4c0ed7c into proyecto26:master Feb 19, 2020
@jdnichollsc
Copy link
Member

Thanks for your contribution! <3

@avenner
Copy link
Contributor Author

avenner commented Feb 19, 2020

Big thanks to you @jdnichollsc and @jorgexgb !

@jorgexgb
Copy link

I really didn't do anything. @avenner @jdnichollsc you guys did everything! Thanks!!! 👍
I pulled the merge and seems to be working!

@jdnichollsc
Copy link
Member

Ok, check the new version 3.4.0 👍

@avenner
Copy link
Contributor Author

avenner commented Apr 8, 2020

Nice !

@jdnichollsc
Copy link
Member

Thanks to you! Sorry for the delay 😄

@avenner
Copy link
Contributor Author

avenner commented Apr 8, 2020

No problem :)

phuongwd pushed a commit to phuongwd/react-native-inappbrowser that referenced this pull request Jul 31, 2020
Supports ephemeralWebBrowserSession on iOS 13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add method to clear cookies
3 participants