Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Dash Okta Auth is a simple library using Okta OAuth2 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 and forked from dash-okta-auth created by Frank Spijkerman.
I decided to deploy to pip after I received no response to this issue.
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_oauth2 import OktaOAuth
server = Flask(__name__)
server.config.update({
'OKTA_OAUTH_CLIENT_ID': ...,
'OKTA_OAUTH_CLIENT_SECRET': ...,
'OKTA_BASE_URL': ...
})
app = Dash(__name__, server=server, url_base_pathname='/')
additional_scopes = [...]
auth = OktaOAuth(app, additional_scopes)
# your Dash app here :)
...
Steps to try this out yourself:
Install the dash-okta-auth
library using pip
:
$ pip install dash-okta-oauth2
Follow the Flask Dance Guide to create an app on the okta admin console
Make a copy of app.py 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.
Run python app.py
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.
FAQs
Dash Okta OAuth2
We found that dash-okta-oauth2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.