[Feature Request] Support prefersEphemeralWebBrowserSession to hide iOS security prompt for system browser
See original GitHub issueWhy?
This mandatory popup is very annoying when using the system browser and can cause confusion to users of the application.
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:
- Created 3 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top GitHub Comments
@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?
Although we might want to change this, as it’s not the GitHub way…