Limited Time Offer: Watch All Our Bubble Tutorial Videos for Only $99 per Year!

Secure your Bubble app by blocking multiple logins

Learn how to enhance the security of your app by ensuring users are only logged in from one location at a time, using the "log out other user sessions" feature. This simple step can help protect valuable data and prevent unauthorized access.

Introduction: How to Ensure Users are Only Logged in at One Location

Here's a little feature in Bubble that you might not know about, and that is to do with the login flow. In this video, we will discuss how to ensure that when a user logs in, they are not logged in somewhere else. This can be particularly important for apps with specific security concerns, where you want to prevent users from sharing login details. Let's dive into the process of ensuring that users are only logged in at one location at a time.

The Login Form

I'm going to show you how to implement this feature using a login form. If you're new to Bubble and want to learn more about building Bubble apps, you can click the link in the description to visit our website and access hundreds of tutorial videos.

On the login button, you'll find a standard workflow. The user is logged in by matching the email field and the password field. Once logged in, the user is directed to a different page in the app.

Log Out Other User Sessions

Now, here's the key feature. In the account settings, you can find an option to "log out other user sessions." This feature ensures that only the current user remains logged in, logging out any other active sessions. It's worth noting that this feature was added in March 2018, but may have been overlooked by some users.

Before recording this video, I wanted to ensure the functionality of this feature. According to Emmanuel, the creator of Bubble, using this option logs out all sessions except the current one from the account page. This Bubble tip is especially useful if you want to ensure users can only log in from a single location at any given time.

Implementation Considerations

A good place to include this feature is on the login form, adding it as an additional step after the user logs in. Another option is to implement it on page load in your header, so that each time the user navigates to a new page, this action runs. However, keep in mind that running this action on every page load may impact your workload units. Therefore, it is essential to carefully evaluate the impact on your app's performance before implementing this feature universally.

Latest videos