question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Support prefersEphemeralWebBrowserSession to hide iOS security prompt for system browser

See original GitHub issue

Why?

This mandatory popup is very annoying when using the system browser and can cause confusion to users of the application.

iOS_Prompt

I got the image from this issue: #512 (Wants to Use “Azure.com” to Sign In - iOS 11)

How?

If the prefersEphemeralWebBrowserSession property is set to true on the ASWebAuthenticationSession then the system browser would not attempt to display the prompt. The trade off is that SSO can not happen because the cookies/browser data will be locked to the single session as shown by the Apple documentation:

Set prefersEphemeralWebBrowserSession to true to request that the browser doesn’t share cookies or other browsing data between the authentication session and the user’s normal browser session. Whether the request is honored depends on the user’s default web browser. Safari always honors the request.

One thing to note is that this is only supported on iOS 13 (and above) so for the cases of iOS 11 & 12 the popup would still be required.

We can have a new method added to the PublicClientApplicationBuilder similar to the withIosKeychainSecurityGroup. The new method could be named something like:

  • withSupportOfSso(bool supportSso)
  • withSsoSupport(bool supportSso)
  • withIosSsoSupport(bool supportSso)

The default for the bool can be false to match the current behavior, in the implementation code. For the method exposed through the client builder it can be true to have clarity of the functionality to the developer.

Apple documentation on the prefersEphemeralWebBrowserSession

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ckrempp91commented, Oct 23, 2020

@jennyf19 If there is a technical limitation for not being able to include this that is fine, but if this is technically possible and just won’t be included could you please explain the reason?

1reaction
bgavrilMScommented, May 10, 2021

Although we might want to change this, as it’s not the GitHub way…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support iOS 13 prefersEphemeralWebBrowserSession #402
iOS 13 introduces the new prefersEphemeralWebBrowserSession property on ASWebAuthenticationSession. Setting this property to true indicates you ...
Read more >
How to Create a Seamless Mobile SSO (Single Sign-On) ...
The following code shows how to remove the prompt, and it assumes your app either does not require SSO or uses Native SSO....
Read more >
Enabling SSO for the AppAuth SDK in iOS
If the system browser was used as the external user-agent, no sharing of users' authentication state would be required. However, leaving an app...
Read more >
About Rapid Security Responses for iOS, iPadOS, and ...
Rapid Security Responses are a new type of software release for iPhone, iPad, and Mac. They deliver important security improvements between ...
Read more >
If you applied Rapid Security Response iOS 16.5.1 (a) ...
iPhone or iPad: Open Settings > About > iOS Version, then tap "Remove Security Response." Tap Remove to confirm. Mac: Choose the Apple...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found