FormidableLabs / react-native-app-auth

React native bridge for AppAuth - an SDK for communicating with OAuth2 providers
https://commerce.nearform.com/open-source/react-native-app-auth
MIT License
2.01k stars 438 forks source link

Microsoft Edge as Custom Browser on iOS #922

Open matice2 opened 10 months ago

matice2 commented 10 months ago

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 commented 5 months ago

Have you tried the iosCustomBrowser option in your configuration?

matice2 commented 5 months ago

@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 commented 5 months ago

Ok, looks like we just need to add the option here and validate: https://github.com/FormidableLabs/react-native-app-auth/blob/aba51ba5e6d9d29d23aa2ae22e88d5e283da7fe6/index.d.ts#L82

faizplus commented 4 months ago

@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.

https://github.com/FormidableLabs/react-native-app-auth/blob/aba51ba5e6d9d29d23aa2ae22e88d5e283da7fe6/ios/RNAppAuth.m#L697-L722

carbonrobot commented 4 months ago

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: https://github.com/openid/AppAuth-iOS/issues/200#issuecomment-364610027). Let's leave this issue open to see if anyone from the community can contribute.