Using AuthSession and WebBrowser.openAuthSessionAsync

  1. SDK Version: 48
  2. Platforms(Android/iOS/web/all): iOS
  3. AuthSession

On iOS we can properly authenticate to our Azure B2C OAuth environment. We receive the correct tokens and our backend properly authenticates the API calls.

When a user clicks on a record I want to open a web browser and show a web page that is protected by the same Azure B2C OAuth environment that we previously authenticated to. We started by using the WebBrowser.openBrowserAsync this prompts the user for their credentials again. Once they enter the credentials then it works.

We then read that — As of iOS 11, SFSafariViewController no longer shares cookies with Safari, so if you are using WebBrowser for authentication you will want to use WebBrowser.openAuthSessionAsync , and if you just want to open a webpage (such as your app privacy policy), then use WebBrowser.openBrowserAsync

So, we tried the WebBrowser.openAuthSessionAsync api. This alerts the user that they are going to a website for authentication if they agree it then opens a popup browser. Once the popup is open It automatically signs the user in which is nice and takes them to the page we want. However, the only button available to close the window with is a Cancel button. It would be nice if that were a Done button.

In summary, we want the functionality of the WebBrowser.openBrowserAsync (full screen, a done button, doesn’t warn the user they are going to a website for authetnication) but with the auto sign in functionality of WebBrowser.openAuthSessionAsync.

I hope that makes sense to someone and that someone has some advice for us to try.

Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.