Best Practices for Keeping a Bubble User Logged in Indefinitely with a Xano Backend

Hey!

I’m looking for advice on how to keep a Bubble user logged in for as long as possible. My Xano auth token is set to never expire, and I’m using the Xano Connector plugin in Bubble.

I was inspired by a video from Eli (the Xano Connector plugin author), where he suggests saving the auth token on the current user in Bubble (which he explains is being saved as a cookie)

His approach involves accessing the token from the bubblecurrent user across the app and then deleting it during logout

However, I’d like to take it a step further and keep the user logged in indefinitely by never deleting the auth token from the current user.

Does anyone have thoughts on this approach? Are there any considerations I should keep in mind, such as security or potential pitfalls?

This is the part in Eli’s video where he explains this method: https://youtu.be/1xs48PNhmB0?si=097UTBE2dqaDP8ft&t=1512

Thanks!!

I would research if tokens can be set to expire in Xano and if so … implement a refresh mechanism. And … would keep Eli’s approach to deleting the token when the current user is logged out. :smiley:

You know, thinking about it there is actually no reason to keep the token if the user is logging out because user just usually do not log out… they just close the app.

about this:

I would research if tokens can be set to expire in Xano and if so … implement a refresh mechanism

Do you mean that you would not use the same token forever, but exchange it to a new one once in a while?

Yeap!