Auth0 Home Blog Docs

Restrict client to a specific connection upon creation

Hello,

We plan to create a single native application/client and database connection for each of our customers who wishes to build mobile apps using our SDKs. The client for a given customer should only be allowed to use that customer’s DB connection. This will be automated through our API, and our backend uses the Auth0 Java package to talk to your management API.

However, there doesn’t appear to be a way to specify which connections a client should be allowed to use when that client is created. Instead, clients appear to be given access to all connections by default, and the only way I can find to restrict a client to a specific connection is to iterate through ALL connections and remove the client in question from each one. Obviously this doesn’t scale.

Is there a better way to achieve this?

Thanks

Hi @chris780,

Welcome to. the Auth0 Community Forum!

Navigate to Settings (by clicking the avatar drop down in the top right of the dashboard) -> Advanced -> Settings -> Enable Application Connections. You can toggle on/off whether new clients are created with all connections or none activated. After this you will have to enable the connection with a call to the patch connections endpoint.

Does that help?

Thanks,
Dan

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.