# How to Capture Browser Google Authentication

**URL:** <https://devforum.zoom.us/t/how-to-capture-browser-google-authentication/99339>\
**Category:** Zoom Apps\
**Created:** [November 30, 2023, 8:31pm UTC](https://devforum.zoom.us/t/how-to-capture-browser-google-authentication/99339 "2023-11-30T20:31:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmcninch](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dmcninch/32/51602_2.png) [@dmcninch](https://devforum.zoom.us/u/dmcninch)\
**Post date:** [November 30, 2023, 8:31pm UTC](https://devforum.zoom.us/t/how-to-capture-browser-google-authentication/99339/1 "2023-11-30T20:31:43Z")

</div>

I have a web app which users can sign into with google or with normal credentials. I want to authenticate my zoom app users as users of my app within zoom. I was able to do so if a user has a valid username/password combination. However, this is proving to be a challenge for Google sign-in users because google disallows embedded browser sign-ins.

Reading the zoom documentation, I found the following ([Authentication](https://developers.zoom.us/docs/zoom-apps/authentication/))  
\*\* Leverage system browser authentication sessions. If your users have active sessions with your service in their default browser, you can reduce friction by sending users to the browser using **OpenURL** and capturing the active authentication from the browser.\*

This seems like a good strategy but I’m not sure how I would capture the authentication and return it to the zoom app.

---

<div class="post-metadata">

**Author:** ![dmcninch](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dmcninch/32/51602_2.png) [@dmcninch](https://devforum.zoom.us/u/dmcninch)\
**Post date:** [December 7, 2023, 3:58pm UTC](https://devforum.zoom.us/t/how-to-capture-browser-google-authentication/99339/2 "2023-12-07T15:58:40Z")

</div>

Still having issues figuring this out. The documentation definitely seems to imply this is possible. I’ve built a unique login page that can open zoom from a deeplink but I’m not sure how to add in the payload with the token, or how to to handle it within the zoom app. Help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![rayj96358](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rayj96358/32/52408_2.png) [@rayj96358](https://devforum.zoom.us/u/rayj96358)\
**Post date:** [December 30, 2023, 5:34pm UTC](https://devforum.zoom.us/t/how-to-capture-browser-google-authentication/99339/3 "2023-12-30T17:34:59Z")

</div>

Integrating authentication with Zoom and managing user sessions can indeed be a bit complex, especially when dealing with different authentication methods. For handling authentication in your Zoom app, you can follow a flow similar to the one outlined below:

1. **Initiate Authentication from Zoom App:**

2. **Redirect User to the Web App for Authentication:**

3. **Authenticate Users:**

4. **Return Token to Zoom App:**

5. **Handle Token in Zoom App:**

Here’s a simplified example in pseudo-code:

```python
# In Zoom App
def initiateAuthentication():
    authenticationURL = "https://yourwebapp.com/authenticate?zoomRedirect=zoomapp://callback"
    openURL(authenticationURL)

# In Your Web App
def authenticateUser():
    # Handle Google sign-in or other authentication methods
    # ...

    # Once authenticated, generate a secure token
    secureToken = generateSecureToken(user)

    # Redirect the user back to the Zoom app with the token
    redirectURL = "zoomapp://callback?token=" + secureToken
    openURL(redirectURL)

# Back in Zoom App
def handleAuthenticationCallback():
    # Extract the token from the URL
    token = extractTokenFromURL()

    # Validate the token and establish a session for the user
    if validateToken(token):
        establishSession(token)
    else:
        handleAuthenticationError()

```

Keep in mind that security is crucial when handling authentication tokens. Ensure that the token is securely transmitted, stored, and validated to prevent unauthorized access. Additionally, consider implementing mechanisms like token expiration and refresh to enhance security. Always follow best practices for secure authentication and communication between your web app and the Zoom app.
