Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -114,18 +114,18 @@ def register():
|
|
114 |
else:
|
115 |
st.error("Unexpected error occur. Please Retry....")
|
116 |
|
117 |
-
if st.button("Register Using Google Account"):
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
|
130 |
|
131 |
# Function to handle login
|
@@ -149,15 +149,15 @@ def login():
|
|
149 |
st.rerun()
|
150 |
else:
|
151 |
st.error("Invalid email id or password")
|
152 |
-
if st.button("google"):
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
|
162 |
|
163 |
# Function for the platform/dashboard page
|
|
|
114 |
else:
|
115 |
st.error("Unexpected error occur. Please Retry....")
|
116 |
|
117 |
+
# if st.button("Register Using Google Account"):
|
118 |
+
# user_info = google_auth.auth()
|
119 |
+
# user_name = f'{user_info.get("user").get("displayName")}'
|
120 |
+
# email = f'{user_info.get("user").get("emailAddress")}'
|
121 |
+
# response = mongo_db.google_register(user_name, email)
|
122 |
+
# if "email ID already Registered" == response:
|
123 |
+
# st.error("Email ID already Registered. Please Log in.")
|
124 |
+
# elif "Registration successful" == response:
|
125 |
+
# st.success("Registration successful! You can now log in.")
|
126 |
+
# st.balloons()
|
127 |
+
# else:
|
128 |
+
# st.error("Unexpected error occur. Please Retry....")
|
129 |
|
130 |
|
131 |
# Function to handle login
|
|
|
149 |
st.rerun()
|
150 |
else:
|
151 |
st.error("Invalid email id or password")
|
152 |
+
# if st.button("google"):
|
153 |
+
# user_info = google_auth.auth()
|
154 |
+
# email = f'{user_info.get("user").get("emailAddress")}'
|
155 |
+
# response = mongo_db.google_login(email)
|
156 |
+
# if response == "Login successful":
|
157 |
+
# st.session_state.logged_in = True
|
158 |
+
# st.rerun()
|
159 |
+
# else:
|
160 |
+
# st.error("Email id is not registered. Please Register")
|
161 |
|
162 |
|
163 |
# Function for the platform/dashboard page
|