"Stay loggedin in" for Passwordless Signup Flow

My platform has a passwordless signup flow for my users by generating a random string for their password field. When they signup Bubble automatically signs them out after 24 hours.
I saw previous threads about how to solve this by logging users in straight after signing up and marking the “Stay logged in” checkbox as “Yes” so that users stay loggedin indefinitely.
Unfortunately, this requires a password to work :frowning:


I don’t want to send them a magic login link after they signed up to keep them signedin for over 24 hours, as this would be a cumbersome experience.
Does anyone have an idea how i can keep my users loggedin after they signed up with a passwordless signup flow? Is this even possible?
Really appreciate it!

Create the random password in a custom state (simply assign the random string to the custom state when button is clicked). Then, continue in the same workflow: Sign them up and then log them in using this custom state’s password. (If you think the login will solve your problems).

Many many thanks!
By storing the password in a custom state, wouldn’t this be risky as it could be seen by someone who is inspecting the page?

What does it matter? The owner of the account has no access since they did not create the account or the password. Also, the custom state is only stored for the current user, which is the user you are creating the account and password for, so they are the only ones that would ever be able to see the custom state (a customs state does not get populated across all user sessions, it is populated across a single user session and the value is lost once the page is refreshed).

What is the overall point of the passwordless login, and what is your expected feature implementation to allow a user to come back to the app and login on their own?

Oh right! That makes a lot of sense. Thank you! I forgot that the custom state is only stored for that individual session, silly me.
The experience i am working towards is that users can signup & login without a password and not get logged out for at least 30 days

The period of time a user stays logged in for is either 1 day or 365 or until they log out.

And what happens when they get logged out and need to login again?

Then they can login via a magic link without a password

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.