https://www.loom.com/share/ef44c089a3284cfe941da66341592030

Connecting your Retool dashboard

To set up DashboardAuth for Retool there are three steps:

  1. Make your Retool dashboard publicly visible by clicking “Share” when previewing your app. Then, enable public access ✅. Use the URL here when creating a new app on www.dashboardauth.com

    Screen Shot 2022-12-06 at 6.19.22 PM.png

  2. Create a “Temporary State” variable in retool to store the user token we are passing in. Here we created one and renamed it to userToken

    Screen Shot 2022-12-06 at 7.07.58 PM.png

  3. Set up your URL parameters in Retool to accept the authentication token being passed in from DashboardAuth. Do this by clicking the three dots on the top right > clicking “URL Parameters” and then add a query parameter with the value {{urlparams.hash.token}}.

    Screen Shot 2022-12-06 at 3.30.11 PM.png

  4. Set up a request to https://api.dashboardauth.com/get-user, passing the authentication token in the request parameters. This will verify the token and return the user object associated with the token.

    Screen Shot 2022-12-06 at 3.31.08 PM.png

  5. Use the user object returned by https://api.dashboardauth.com/get-user to restrict access to your dashboard based on the user's permissions or roles. If this request fails, the user token is probably invalid and you should redirect the user to the signin page at [yoursubdomain].dashboardauth.com

Once you have completed these steps, your Retool dashboard will be securely authenticated using the dashboardauth.com service. These steps can be easily adapted for Streamlit as well.