Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom WebView not working in Shared Device Mode #2366

Open
Joe-Palmer opened this issue Oct 10, 2024 · 2 comments
Open

Custom WebView not working in Shared Device Mode #2366

Joe-Palmer opened this issue Oct 10, 2024 · 2 comments
Assignees
Labels

Comments

@Joe-Palmer
Copy link

We have built authentication into our app using a custom WebView as described here:

https://learn.microsoft.com/en-us/entra/msal/objc/customize-webviews#change-per-interactive-request

This works fine on all devices except those we have configured with Intune to use Shared Device Mode.

I can't find any documentation that says this won't work and I can't think of any reason why it shouldn't so is this a bug?

@hieunguyenmsft hieunguyenmsft self-assigned this Oct 10, 2024
@Joe-Palmer
Copy link
Author

I have done some more testing and I can confirm that this is definitely a bug. Enabling Shared Device Mode causes the webviewType setting to have no effect so this impacts all types of WebView, not just custom WebViews.

This can be easily replicated by simply installing and uninstalling the Authenticator app on a device configured with Shared Device Mode. Attached are 2 screenshots running exactly the same code with webViewParameters.webviewType = .authenticationSession with the only difference being whether the Authenticator App is installed.

It is almost like MSAL somehow launches the Authenticator App's WebView (when it is installed and using Shared Device Mode) but doesn't respect any of the WebView settings.

Any idea how to fix this? The WebView being launched doesn't support our authentication method so we need to set a different type.

IMG_0031
IMG_0030

@mipetriu
Copy link
Contributor

Hi @Joe-Palmer, Shared Device Mode relies on the Microsoft Enterprise SSO extension for authentication. When the SSO extension is enabled for the device and the Authenticator app is downloaded, the SSO extension's UI will show up over your app and handle the login request using the improved SSO and security features offered by the Authenticator app.

It's true that in this case, the login webview belongs to the SSO extension rather than the to the MSAL implementation in your app. This behavior is expected whenever the SSO extension is enabled for the device, not only in Shared Device Mode.

Any idea how to fix this? The WebView being launched doesn't support our authentication method so we need to set a different type.

Could you share more about this? The SSO extension has capabilities to provide SSO with the Safari browser and other apps that do not use MSAL.

@mipetriu mipetriu assigned mipetriu and unassigned hieunguyenmsft Oct 21, 2024
@mipetriu mipetriu added question and removed bug labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants