Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,7 @@ import os
|
|
| 2 |
import streamlit as st
|
| 3 |
import firebase_admin
|
| 4 |
from firebase_admin import credentials, db, auth, firestore
|
|
|
|
| 5 |
import face_recognition
|
| 6 |
from PIL import Image
|
| 7 |
import numpy as np
|
|
@@ -48,7 +49,7 @@ def authenticate_user(email, password):
|
|
| 48 |
auth.verify_password(password, user.password)
|
| 49 |
# The user is successfully fetched, meaning the email and password are valid.
|
| 50 |
return True, user
|
| 51 |
-
except
|
| 52 |
print(f"Authentication error: {str(e)}")
|
| 53 |
return False, None
|
| 54 |
except Exception as e:
|
|
|
|
| 2 |
import streamlit as st
|
| 3 |
import firebase_admin
|
| 4 |
from firebase_admin import credentials, db, auth, firestore
|
| 5 |
+
from firebase_admin.auth import AuthError
|
| 6 |
import face_recognition
|
| 7 |
from PIL import Image
|
| 8 |
import numpy as np
|
|
|
|
| 49 |
auth.verify_password(password, user.password)
|
| 50 |
# The user is successfully fetched, meaning the email and password are valid.
|
| 51 |
return True, user
|
| 52 |
+
except AuthError as e:
|
| 53 |
print(f"Authentication error: {str(e)}")
|
| 54 |
return False, None
|
| 55 |
except Exception as e:
|