feat(auth): Add basic authentication to app
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import json
|
||||
import os
|
||||
from typing import Any, Dict, Tuple
|
||||
|
||||
import dash_auth
|
||||
import pandas as pd
|
||||
from app_styles import header_style
|
||||
from dash import (
|
||||
@@ -22,6 +24,10 @@ from sql_utils import execute_query, test_db_connection
|
||||
external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]
|
||||
|
||||
app = Dash(__name__, external_stylesheets=external_stylesheets)
|
||||
auth = dash_auth.BasicAuth(
|
||||
app,
|
||||
{os.getenv("APP_UNAME"): os.getenv("APP_PW")},
|
||||
)
|
||||
app.index_string = header_style
|
||||
|
||||
notification_md = """
|
||||
|
||||
Reference in New Issue
Block a user