Skip to main content

Dash Okta Auth

Project description

Dash Okta Auth

Dash Okta Auth is a simple library using Okta OAuth to authenticate and view a Dash app.

This Library uses Flask Dance and a modified version of Plotly's own dash auth for authentication.

This Library is heavily inspired by dash-google-oauth created by Lucas Chapin

Basic Use

Authentication can be added to your Dash application using the OktaOAuth class, i.e.

from dash import Dash
from flask import Flask
from dash_okta_auth import OktaOAuth

server = Flask(__name__)

app = Dash(__name__, server=server, url_base_pathname='/', auth='auth')

additional_scopes = [...]
auth = OktaOAuth(app, base_url='', additional_scopes)

# your Dash app here :)


Steps to try this out yourself:

  1. Install the dash-okta-auth library using pip:

    $ pip install dash-okta-auth
  2. Follow the Flask Dance Guide to create an app on the okta admin console

  3. Make a copy of and set the variables (or set the corresponding environment variables):

    server.config["OKTA_OAUTH_CLIENT_ID"] = ...
    server.config["OKTA_OAUTH_CLIENT_SECRET"] = ...

    with values from the Okta OAuth 2 application you should have set up earlier. If you've set these up properly, you can find them at Applications > yourapp > General under the section Client Credentials.

  4. Run python and open localhost in a browser window to try it out! If the app loads automatically without prompting a Okta login, that means you're already authenticated -- try using an inokta window in this case if you want to see the login experience for a new user.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dash-okta-auth, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size dash-okta-auth-0.0.1.tar.gz (11.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page