OAuth 2 Via Mobile Safari Redirection

Description
I am currently integrating Zoom’s OAuth flow in my mobile app. I am not using the Mobile SDK as its memory footprint is too large for what I’m trying to achieve.

I’ve set up a Zoom app, with correct redirect URLs & dev client IDs setup on my client.
Whenever I try to get authenticated with my zoom developper account (the one I created the app with), I do not get redirected to my Redirect URI.

Account setup:

  • I created a Zoom Developper account via my work email account
  • That Zoom Developper account was used to create the zoom app I’m trying to authorize against.

I have tried:

  • Using SFSafariViewController
  • Using ASWebAuthenticationSession

For both those solutions, the auth webview is just stuck on the google signin screen after successfully signing in Google.

Error
If I use SFSafariViewController: WebView is stuck on the google signin screen after successfully signing in Google.
However, if I then dismiss the SFSafariViewController and launch a new one with the same authorization URL, the redirect happens.

If I use ASWebAuthenticationSession, WebView is stuck on the google signin screen after successfully signing in Google.
However, if I then dismiss the SFSafariViewController and launch a new one with the same authorization URL, the redirect happens.

I verified, and the redirection works for the same account / same app, using a non-mobile browser.

I couldn’t find any helpful callbacks via SFSafariViewControllerDelegate and ASWebAuthenticationSession’s completion handler is staying silent.

Which App Type (OAuth / Chatbot / JWT / Webhook)?
OAuth

Which Endpoint/s?
OAuth Autorization

How To Reproduce (If applicable)
Steps to reproduce the behavior:

  1. Request URL: https://zoom.us/oauth/authorize?response_type=code&client_id=CLIENT_ID_DEV&redirect_uri=https%3A%2F%2Fcue.app%2Fauthorize
  2. WebView is stuck on the google signin screen after successfully signing in Google. (See Screenshots)

Screenshots (If applicable)
Stuck state of my mobile browser

Hey @clement,

Let me bring in @Carson_Chen to see if he can help.

Have you tried doing the OAuth flow using the actual browser app instead of the WebView? And then redirecting back to your app after landing on the redirect url?

Thanks,
Tommy

Hey @tommy

Thanks for your answer and apologies for the delayed response. I have indeed moved to using the actually Safari App to handle the authentication flow. It works.
However, I still think that the same authentication flow should be working using native and moderns APIs such as ASWebAuthenticationSession.

Happy to provide more information if you guys are looking to fix it.

1 Like

Thanks @clement, and happy to hear you got it working! :slight_smile:

Feel free to submit that as a feature request here: #feature-requests

-Tommy