Backendless Support

Handling user logins with the same user credentials

It is a common use-case when two or more users try (or need) to login to an application using the same userid and password combination.

Some applications allow it (for example, Netflix supports concurrent logins with the same credentials from different devices) and other apps restrict it. 

With Backendless you can easily configure the backend to support either way of handling multiple logins without writing a single line of code. 

To configure the multiple login policy a developer should:

  1. Login to Backendless console, select an app and click the Users icon.
  2. Click the Login menu.
  3. The Enable Multiple Login section is responsible for configuring the backend's concurrent login policy (for the users who use the same login credentials). 

Allowing users of an app to login with the same userid/password:

  1. Click the Enable Multiple Logins toggle to set it to the ON state.
  2. Enter the number of concurrent users into the Maximum number of simultaneous logins for an account text field. This is how many users can login at the same time using the same user/password. Essentially this is how many concurrent user sessions with for the same user account Backendless will allow for your app.

Disable concurrent user sessions for the same user account:

  1. Click the Enable Multiple Logins toggle to set it to the OFF state.
  2. Ignore the Maximum number of simultaneous logins for an account text field.
  3. Make a selection between the First user and Second user radio buttons. If a developer selects First user, then Backendless will terminate the session which was already there any time another user logs in with the same credentials. If a developer selects Second user, then only one user per account will be able to login. Any time a second user tries to login using the same credentials, Backendless will block that login.
Is article helpful?