Hello community!
I have a really simple question and it concerns the problem about iOS SSO alert box. The Devs have written this Q&A: Auth0.swift/FAQ.md at master · auth0/Auth0.swift · GitHub . The problem is that they state that when using .provider(WebAuthentication.safariProvider())
I have to manually return to my app which is something I don’t know how to do. I would be really happy to find out how. I am using SwiftUI.
Hey there!
Actually you have three points listed here:
# Frequently Asked Questions
1. [How can I disable the _login_ alert box?](#1-how-can-i-disable-the-login-alert-box)
- [Use ephemeral sessions](#use-ephemeral-sessions)
- [Use `SFSafariViewController`](#use-sfsafariviewcontroller)
2. [How can I disable the _logout_ alert box?](#2-how-can-i-disable-the-logout-alert-box)
3. [How can I change the message in the alert box?](#3-how-can-i-change-the-message-in-the-alert-box)
4. [How can I programmatically close the alert box?](#4-how-can-i-programmatically-close-the-alert-box)
---
## 1. How can I disable the _login_ alert box?
![sso-alert](https://user-images.githubusercontent.com/5055789/198689762-8f3459a7-fdde-4c14-a13b-68933ef675e6.png)
Under the hood, Auth0.swift uses `ASWebAuthenticationSession` by default to perform web-based authentication, which is the [API provided by Apple](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) for such purpose.
That alert box is displayed and managed by `ASWebAuthenticationSession`, not by Auth0.swift, because by default this API will store the session cookie in the shared Safari cookie jar. This makes single sign-on (SSO) possible. According to Apple, that requires user consent.
> **Note**
This file has been truncated. show original
under three sections (depends on your current implementation):
Using the UIKit app lifecycle
Using the UIKit app lifecycle with Scenes
Using the SwiftUI app lifecycle
No matter what option you use I believe the only change you need to make is to provide an appropriate URL
system
Closed
March 13, 2023, 8:14am
3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.