I am currently working on SSO using Auth2. For that purpose I have used AuthSwift this pod. My purpose is to provide SSO to the multiple apps. Like when user will logged in "A App" and install "B App" , then for B App it should not ask to login again. (Like facebook app and facebook messanger app works). For that purpose I gone through the following way. (I have already implemented the same Auth2 code in both the apps i.e. A App and B App)
1] Using webview - But it asks every time to login (For A App and B App)
2] Using SFSafariViewController - When I open App A for the first time it ask me to login, then I closed the app after login. Again I open the A App, it does not ask me to login , it redirects on the home page directly. Same procedure I followed for B App. Here in B App it again asks me to login. and after login I can redirects on the home page. Here what I want is that, both App should share the session (cookies) between same SFSafariViewController. But I found something like "Impact of iOS 11 no longer providing shared cookies between Safari, Safari View Controller instances" So what to do??
3] Safari Browser - After using above I chosen the this option. A App and B App shares the common Safari Browser cookies (until user remove safari browser from background). But whenever I open both the apps , every-time it asks me (by showing dialog) to open App from safari browser. What is the solution for this.
I have gone through the above scenario, but still not able to achieve what I want.