Facility Control

 View Only

OAuth 2.0 Authentication in Dashboard

  • 1.  OAuth 2.0 Authentication in Dashboard

    Posted 29 days ago

    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:

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

    2. 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:

      <panel> <!-- Define the button for authentication --> <button buttontype="push" height="38" left="287" name="Authenticate with Google" onclick="onAuthenticateButtonClick()" top="147" width="135"/> <!-- 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> </panel>

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

    1. Is it possible to launch a web browser from a Ross Dashboard button using ogScript?
    2. 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?
    3. 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!



    ------------------------------
    Joseph LaMere
    Broadcast Engineer
    Children's Minnesota
    ------------------------------