# OAuth 2.0 Authentication in Dashboard

**URL:** <https://rossvideo.community/t/oauth-2-0-authentication-in-dashboard/8891>\
**Category:** Automation & Control\
**Created:** [September 6, 2024, 3:27pm UTC](https://rossvideo.community/t/oauth-2-0-authentication-in-dashboard/8891 "2024-09-06T15:27:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![josephlamere](https://rossvideo.community/letter_avatar_proxy/v4/letter/j/77aa72/32.png) [@josephlamere](https://rossvideo.community/u/josephlamere)\
**Post date:** [September 6, 2024, 3:27pm UTC](https://rossvideo.community/t/oauth-2-0-authentication-in-dashboard/8891/1 "2024-09-06T15:27:00Z")

</div>

Hi,

I’m currently working on a custom panel in Ross Dashboard and I’m trying to set up a button that can launch a web browser to authenticate with Google using OAuth 2.0. Here’s what I’ve tried so far:

Button Configuration: I’ve created a button with the onclick event set to call a function (onAuthenticateButtonClick()) defined in my ogScript.

Script Setup: My ogScript contains a function (openGoogleAuthPage()) that uses browser.openURL() to open the Google OAuth authentication URL. Here is a simplified version of my setup:

```
<!-- Embedding the ogScript -->
<ogscript>
    <![CDATA[
    function openGoogleAuthPage() {
        var authURL = "https://accounts.google.com/o/oauth2/auth?client_id=CLIENT_ID" +
            "&amp;redirect_uri=urn:ietf:wg:oauth:2.0:oob" +
            "&amp;response_type=code" +
            "&amp;scope=https://www.googleapis.com/auth/youtube.readonly" +
            "&amp;access_type=offline";
        browser.openURL(authURL);
    }

    function onAuthenticateButtonClick() {
        openGoogleAuthPage();
    }
    ]]>
</ogscript>

```

However, when I click the button, nothing happens - no browser is launched.

Is it possible to launch a web browser from a Ross Dashboard button using ogScript?

If yes, what is the correct method or function to achieve this? Are there any specific permissions or settings I need to configure in Dashboard to allow this behavior?

If not, what are the recommended alternative approaches for implementing OAuth 2.0 authentication in a Dashboard panel?

Any guidance or suggestions would be greatly appreciated!

Thank you!
