diff --git a/main.py b/main.py index b7e32b9..85e3387 100644 --- a/main.py +++ b/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():