Ajout d'un message de connexion réussie
This commit is contained in:
parent
19953b8429
commit
c7e193b912
1 changed files with 4 additions and 0 deletions
4
main.py
4
main.py
|
@ -77,9 +77,13 @@ with tab0:
|
|||
# Send a POST request to your authentication endpoint
|
||||
response = requests.post(f'{fabriquedoc_endpoint}/token/', data={"username": username, "password": password})
|
||||
if response.status_code == 200:
|
||||
st.write("Connexion réussie!")
|
||||
bearer_token = response.json()["access_token"]
|
||||
# Store the bearer token in the session state
|
||||
st.session_state['bearer_token'] = bearer_token
|
||||
else:
|
||||
st.error("Connexion échouée!")
|
||||
st.session_state['bearer_token'] = ""
|
||||
|
||||
with tab1:
|
||||
def button1_callback():
|
||||
|
|
Loading…
Reference in a new issue