tylerjrichards / st-paywall

A python package for creating subscription Streamlit apps
MIT License
235 stars 46 forks source link

How to make login session persist? #44

Closed pkonduri closed 8 months ago

pkonduri commented 8 months ago

When a user logs in (by clicking the Login with Google button), and then refreshes the page, they are asked to login again. How do we make this login state persist across website refreshes?

This issue can be seen in the https://subscription.streamlit.app/ app

jozkotrapko commented 8 months ago

If I'm not mistaken, streamlit doesn't provide cookies and that's why the user loses the login after refreshing the page.

tylerjrichards commented 8 months ago

yeah this is exactly it, i've been trying to add it to cookies but that doesn't work either, because then someone could just edit their cookies to someone who is subscribed and get in easily. So it would be way less secure that way.

tylerjrichards commented 8 months ago

closing this as it is a dupe of https://github.com/tylerjrichards/st-paywall/issues/23