iOS Permission Popup Appears During Login With Auth0.swift SDK
Last Updated:
Overview
This article explains why a permission popup appears when a user attempts to sign in using the Auth0.swift Software Development Kit (SDK).
The following message is displayed: "App" Wants to Use "auth0.com" to Sign In. This allows the app and website to share information about you.
Applies To
- Auth0.swift SDK
Cause
The Auth0.swift Software Development Kit (SDK) uses Apple's ASWebAuthenticationSession for web-based authentication. This process stores the session cookie in the shared Safari cookie jar, which requires user consent as per Apple's guidelines, triggering the permission popup.
Solution
- Review the How can I disable the login alert box thread in F.A.Q section of Auth0.swift SDK repository to learn about managing the pop-up.
- Review ASWebAuthenticationSession vs SFSafariViewController (iOS) to determine the best option for the use case.
-
If Single Sign-On (SSO) is not a requirement, proceed with one of the following options:
-
Use ASWebAuthenticationSession to prevent the pop-up. This is configured by adding
useEphemeralSession()to the login call. -
Use
SFSafariViewControllerwhich supports SSO, though it requires additional configuration.
-