Hi everyone,
I have a Xamarin project that will go productive in a month and I have a couple of issues here.
1st I would like to disable the confirm popup like in the screenshot below.
It’s annoying for the user (and the management) to be asked every single time they login.
I understand it’s a iOS check but there is a way to improve the UX?
I found a similar issue here:
But I would never know how to set useLegacyAuthentication() in Xamarin.iOS
2nd while searching for an answer the following post raised another concern:
Is this something I need to take into consideration?
Indeed, it’s a system alert from the iOS platform itself and cannot be significantly modified. Since you’re using the Universal Login, iOS will trigger this message whenever your app opens the browser to perform authentication.
Using the .useEphemeralSessions method basically toggles the iOS prefersEphemeralWebBrowserSession to true, which prevents any session data or auth cookies from being shared with the regular browser, as stated in apple’s documentation:
In this case, since no data is shared, iOS does not prompt the user for consent, but this also prevents any SSO from taking place, as the session cookies cannot be shared across different authentication sessions. If you don’t plan on any SSO this should be completely fine. Do not, however, that if a user is signed in with their social account (google, facebook, etc) in the system browser and they select “Sign in with …” in your app, they’ll be prompted to sign in again in the social provider, as the previous session will not be shared across.
For Xamarin you’ll need to change your Auth0Client object to include the PrefersEphemeralWebBrowserSession parameter as:
var client = new Auth0Client(new Auth0ClientOptions
{
Domain = "YOUR_AUTH0_DOMAIN",
ClientId = "YOUR_AUTH0_CLIENT_ID",
Browser = new ASWebAuthenticationSessionBrowser(
new ASWebAuthenticationSessionOptions
{
PrefersEphemeralWebBrowserSession = true
}
)
});