Skip to content

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Oct 23, 2023
1 parent b875b38 commit cb4513a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import streamlit as st
import ssl
from auth0_component import login_button
import logging

clientId = os.getenv("AUTH0_CLIENT_ID")
domain = os.getenv("AUTH0_DOMAIN")
Expand All @@ -10,14 +11,17 @@
ssl._create_default_https_context = ssl._create_unverified_context


logger = logging.getLogger(__name__)

def check_password():
"""Returns `True` if the user had the correct password."""

with st.sidebar:
try:
user_info = login_button(clientId=clientId, domain=domain,debug_logs=True)
except:
except Exception as e:
st.text('Could not run auth')
logger.error(f'Could not run auth {e}')
return False

if user_info is None:
Expand Down

0 comments on commit cb4513a

Please sign in to comment.