Navigation

Configuring device limits

Configure default device limits for your users via the dashboard, and override these limits on a user-by-user bases.

There are two ways you can set the device limits for your users.

Default device limits

The easiest way to set a default device limit for all of your users is via the dashboard settings. From there you can configure the default fallback limits and the click on save. If you choose to rely entirely on this option, you don't need to do anything else.

Adding a limit_config parameter in the client-side SDKS will override the dashboard configuration.

If you provide any limit config in the SDKs, they will override the default limit set on the dashboard. Therefore, if you want to have all your users share the same device limit, rely on the dashboard fallback setting.

Relying on the dashboard for default limits applies effects in real-time.

Dashboard settings

Individual device limits

You can also set the device limits via the SDKS. To do that, pass a limit config object in all the client-side SDKs. This could be useful if the number of devices a user can have is depended on the plan they are on. Here's a code snippet overriding the default limit config.

await Sabil.attach({  client_id: "client_id",  user: "user_id",  limit_config: { overall_limit: 2 },  on_current_device_logout: () => {    //TODO: [important] Perform log out logic  },});