smallbets / userbase

Create secure and private web apps using only static JavaScript, HTML, and CSS.
https://userbase.com
MIT License
2.28k stars 125 forks source link

Remember me forever #180

Closed raae closed 4 years ago

raae commented 4 years ago

My user's have been asking me why they have to log in again all the time. They want it to be more "app like" and are not to worried about someone accessing their phones.

Could it be possible to get a remember me until I explicitly sign out. Or is this already possible and I have just missed the docs.

j-berman commented 4 years ago

We're currently working on the ability to add a custom expiry length!

The plan is to allow a max of 1 year, but each time you call init, you can extend the expiry length by this duration. So if your user revisits the app within 1 year, you can extend their session an additional year.

raae commented 4 years ago

That is great solution.

For our app we could set that at their average menstrual cycle length plus some.

To give them a chance to stay logged in with the bare minimum use.

Thanks for the swift reply.

j-berman commented 4 years ago

Deployed in userbase-js v2.1.0!

init, signIn, and signUp now accept a number in hours for a new sessionLength parameter :)