Spaces:
Sleeping
Sleeping
Update AUTH.py
Browse files
AUTH.py
CHANGED
|
@@ -80,3 +80,13 @@ def require_login(auth_page_name: str = "AUTH", redirect_page: str = None):
|
|
| 80 |
# Otherwise redirect to auth page and stop rendering
|
| 81 |
st.experimental_set_query_params(page=auth_page_name)
|
| 82 |
st.stop()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
# Otherwise redirect to auth page and stop rendering
|
| 81 |
st.experimental_set_query_params(page=auth_page_name)
|
| 82 |
st.stop()
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
# If you prefer the helper, we show login widget here
|
| 86 |
+
succeeded = login_ui()
|
| 87 |
+
if succeeded:
|
| 88 |
+
# after successful login we set the flag and redirect to the home page
|
| 89 |
+
set_logged_in(True)
|
| 90 |
+
# redirect to the page you want as "home" (exact page title)
|
| 91 |
+
st.experimental_set_query_params(page="HOW TO USE") # change to your home page title
|
| 92 |
+
st.experimental_rerun()
|