Skip to content
New issue

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

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

Already on GitHub? # to your account

Microsoft Edge as Custom Browser on iOS #922

Open
matice2 opened this issue Nov 21, 2023 · 5 comments
Open

Microsoft Edge as Custom Browser on iOS #922

matice2 opened this issue Nov 21, 2023 · 5 comments
Labels
enhancement A new feature help wanted Assistance or domain expertise required issue-accepted This issue has been confirmed and accepted by the maintainers

Comments

@matice2
Copy link

matice2 commented Nov 21, 2023

Hi,

I need specifically the Microsoft Edge Browser to be used on iOS devices while authenticating. When trying to login in Safari, I get this message: You must use Microsoft Edge to access this resource.

Has anyone already had this problem and solved it by using an alternative, please message me.

Thank you!

@carbonrobot
Copy link
Contributor

Have you tried the iosCustomBrowser option in your configuration?

@carbonrobot carbonrobot added needs-more-info This issue may not have sufficient information for a contributor to take action question labels May 2, 2024
@matice2
Copy link
Author

matice2 commented May 6, 2024

@carbonrobot Hi, iosCustomBrowser does not have the option for the Edge browser. I have tried it with other browsers like Chrome or Firefox - it works for them, but not for Edge.

We have not solved this issue with the Edge. The conditional access for iOS devices has been adjusted so that Safari is allowed for the SSO. This way it works.

@carbonrobot carbonrobot added enhancement A new feature help wanted Assistance or domain expertise required issue-accepted This issue has been confirmed and accepted by the maintainers and removed needs-more-info This issue may not have sufficient information for a contributor to take action question labels May 6, 2024
@carbonrobot
Copy link
Contributor

Ok, looks like we just need to add the option here and validate:

iosCustomBrowser?: 'safari' | 'chrome' | 'opera' | 'firefox';

@faizplus faizplus self-assigned this May 8, 2024
@faizplus
Copy link
Contributor

faizplus commented May 9, 2024

@carbonrobot since we are using AppAuth-iOS and it does not have any method exposed for Microsoft Edge like CustomBrowserChrome CustomBrowserFirefox CustomBrowserOpera CustomBrowserSafari, we will not be able to support Microsoft Edge browser for iOS.

#if !TARGET_OS_MACCATALYST
- (id<OIDExternalUserAgent>)getCustomBrowser: (NSString *) browserType {
typedef id<OIDExternalUserAgent> (^BrowserBlock)(void);
NSDictionary *browsers = @{
@"safari":
^{
return [OIDExternalUserAgentIOSCustomBrowser CustomBrowserSafari];
},
@"chrome":
^{
return [OIDExternalUserAgentIOSCustomBrowser CustomBrowserChrome];
},
@"opera":
^{
return [OIDExternalUserAgentIOSCustomBrowser CustomBrowserOpera];
},
@"firefox":
^{
return [OIDExternalUserAgentIOSCustomBrowser CustomBrowserFirefox];
}
};
BrowserBlock browser = browsers[browserType];
return browser();
}
#endif

@carbonrobot
Copy link
Contributor

We might be able to extend support [using a Custom browser implementation as talked about here](Are we able to use a custom browser implementation as talked about here: openid/AppAuth-iOS#200 (comment)). Let's leave this issue open to see if anyone from the community can contribute.

@faizplus faizplus removed their assignment May 10, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement A new feature help wanted Assistance or domain expertise required issue-accepted This issue has been confirmed and accepted by the maintainers
Projects
None yet
Development

No branches or pull requests

3 participants