# OAuth 2 Via Mobile Safari Redirection

**URL:** <https://devforum.zoom.us/t/oauth-2-via-mobile-safari-redirection/15610>\
**Category:** API and Webhooks\
**Created:** [April 30, 2020, 5:30pm UTC](https://devforum.zoom.us/t/oauth-2-via-mobile-safari-redirection/15610 "2020-04-30T17:30:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![clement](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/clement/32/7380_2.png) [@clement](https://devforum.zoom.us/u/clement)\
**Post date:** [April 30, 2020, 5:30pm UTC](https://devforum.zoom.us/t/oauth-2-via-mobile-safari-redirection/15610/1 "2020-04-30T17:30:38Z")

</div>

**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

> **[OAuth 2.0 - Authorization - Documentation](https://marketplace.zoom.us/docs/guides/auth/oauth#getting-access-token)**
>
> OAuth with Zoom
> 
> The Zoom API uses OAuth 2.0 to authenticate and authorize users to make requests. To setup access credentials and request scopes for yo...

**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](https://zoom.us/oauth/authorize?response_type=code&client_id=CLIENT_ID_DEV&redirect_uri=https%3A%2F%2Fcue%2Eapp%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

 ![IMG_E9994D1DFEBF-1](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/c/ca7962627b495da98da6a786edbd67c82884cda6.jpeg)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 5, 2020, 10:33pm UTC](https://devforum.zoom.us/t/oauth-2-via-mobile-safari-redirection/15610/2 "2020-05-05T22:33:07Z")

</div>

Hey @clement,

Let me bring in @carson.zoom 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

---

<div class="post-metadata">

**Author:** ![clement](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/clement/32/7380_2.png) [@clement](https://devforum.zoom.us/u/clement)\
**Post date:** [June 17, 2020, 6:00pm UTC](https://devforum.zoom.us/t/oauth-2-via-mobile-safari-redirection/15610/3 "2020-06-17T18:00:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [June 19, 2020, 7:57pm UTC](https://devforum.zoom.us/t/oauth-2-via-mobile-safari-redirection/15610/4 "2020-06-19T19:57:12Z")

</div>

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

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

-Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 10:09pm UTC](https://devforum.zoom.us/t/oauth-2-via-mobile-safari-redirection/15610/5 "2020-08-21T22:09:32Z")

</div>

Closed on August 21, 2020, 10:09pm UTC


