I’m encountering an issue with my Streamlit app. The app uses supabase auth and session. The print statement revealed that the session turns into ‘None’ every time you refresh the browser. But this only happens on mobile browsers. On a desktop browser, we can see that the session would not be ‘None’ even after refreshing the page.
Here’s the relevant code snippet:
session = login_form(
url=url,
apiKey=key,
providers=["google"],
)
print (session)
if not session:
streamlit.warning('If you use Email Sign in/Sign up. Please Check Your Email To Verify Your Account. Thank you!', icon="????")
Context:
I’m using Streamlit for developing a web application that requires user authentication . The app uses supabase-streamlit-auth library for managing user sessions and authentication.
Observations:
- The issue occurs specifically on mobile devices.
- the session is ‘None’
- Session works fine in desktop browsers
Expected Behavior:
After refreshing the page on mobile devices, the session should not be ‘None’
Question:
Has anyone encountered a similar issue with Streamlit apps on mobile devices? How did you solve it? Are there any best practices or alternative approaches for handling session management and page refreshes on mobile devices in Streamlit?
Any insights or suggestions would be greatly appreciated! Thank you!
Suyog Joshi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.