Is it possible to obtain authorization cookies after logging in with the Auth0 iOS SDK?

There is a website that uses the Auth0 SDK. Recently, there was a need to create an iOS application (Swift / UIKit) that could display this website in a WKWebView. I decided to use the following flow: the user logs in using the iOS Auth0 SDK, and then I try to get the authentication cookies to pass them to WKWebView. However, I am unable to do so because the SFSafariViewControllerDelegate, which I believe is used by the library, does not share cookies with the application. The option of authorizing in the full system browser also does not work because cookies are not shared with other applications here either. The problem is that authentication on the website is done specifically through cookies.

Please tell me, is it possible to obtain authentication cookies from the iOS Auth0 SDK in order to pass them to WKWebView for silent authentication? Or is it better in this case to conduct the authorization entirely in WKWebView without using the Auth0 SDK?

Hi @SilverFox,

Welcome to the Auth0 Community!

I don’t think it’s possible to share the session between a webview and the default browser. There’s a bit more info in this FAQ: Is SSO possible between a Native App and Regular Web App?

1 Like

Thank you for your response!

1 Like

Let us know if you have any other questions!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.