Skip to main content

entri.connectDomain(config)

This method launches the Entri modal window. config is an object with the following properties:

Possible connectDomain() Errors

When any of the following critical errors occur, a console error will be logged, and the user will only see “Entri is misconfigured. Please contact support for assistance.” in the UI.

Token creation (JWT)

To launch the Entri modal window in a session, you’ll need to fetch a JWT using the secret key and applicationId provided by the Entri dashboard. For security reasons and in order to not expose your secret in the browser, please make sure to fetch the JWT on the server-side of your application. The JWT expires after 60 minutes. You can use any networking library you’d like. Here’s an example using javascript:
JS

Enhancing Integration Security

To further enhance the security of your integration, you have the option to include the domain, dnsRecords or product in the JWT creation process. When these elements are added, Entri will validate them during execution, providing an additional layer of security.

Request body

JSON

Parameters description

Successful response (200 status)

JSON
For more details about how freeDomain is used in Entri Sell, refer to the Advanced Security Settings for freeDomain section.

Endpoints that require a product claim

When a JWT carries a product value, Entri only accepts it on the endpoints of that product. A token issued for sell, for example, is rejected with a 403 and the message JWT is not valid for this resource on Power or Secure endpoints. The server-side endpoints that list every domain of an application go one step further and require the matching product claim. A token without it is rejected with a 403 and the message The token must be issued with product '<product>' to use this endpoint, and no domains are returned. This applies even to applications that have authentication disabled. Endpoints that act on a single domain, such as the Power and Secure eligibility checks with ?domain= or the Monitor endpoints for one domain, keep working with a token that has no product claim. On Monitor, the domain and dnsRecords claims are also enforced on every single-domain endpoint. See Token scope for the rules.