You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To customize the browser, you must allow cookie sharing to prevent repeated login prompts.
33
33
34
34
## Resolution
35
35
36
-
To enable cookie sharing and prevent repeated login prompts, use one of the following configurations:
36
+
To enable SSO and cookie sharing between MSAL and your iOS app, use of the following solutions:
37
37
38
-
-**ASWebAuthenticationSession in MSAL** + **openURL in Safari browser** (the full Safari browser, not SafariViewController).
39
-
-**SFSafariViewController in MSAL** + **SFSafariViewController in your app**.
40
-
-**WKWebView in MSAL** + **WKWebView in your app**.
38
+
- Use `ASWebAuthenticationSession` and system Safari browser (`UIApplication.shared.open`)
41
39
42
-
For more information, see [Customizing webviews and browsers](/azure/active-directory/develop/customize-webviews).
40
+
- Use Case: Your app uses MSAL with the default `ASWebAuthenticationSession` instance, and you open external links or logout flows in the system Safari browser.
41
+
- Note: `ASWebAuthenticationSession` is the recommended method for MSAL interactive auth on iOS 12+. It's the only supported method on iOS 13+. It is privacy-preserving and shares cookies with system Safari browser. SSO works between MSAL and system Safari browser because they share cookies through the system authentication session.
42
+
- Use `WKWebView`
43
+
- Use Case: You explicitly configure MSAL to use `WKWebView` and your app also uses `WKWebView` for related workflows.
44
+
- Note: If you use `WKWebView` for a consistent experience within your app, note that it is sandboxed and does not share session cookies with Safari or other apps. This supports SSO only within your app.
43
45
44
-
> [!Note]
45
-
> For Xamarin.iOS, several additional factors need to be considered, including enabling token caching and using Microsoft Authenticator. For more information, see [Xamarin.iOS MSAL considerations](/azure/active-directory/develop/msal-net-xamarin-ios-considerations).
46
+
For more information, see [Customizing webviews and browsers](/azure/active-directory/develop/customize-webviews).
0 commit comments