From 7e18a8eb251d7d3990e70de2c4e70f2bc0724faf Mon Sep 17 00:00:00 2001 From: Benny Neugebauer Date: Mon, 9 Sep 2024 11:00:47 +0200 Subject: [PATCH 1/3] Highlighted region in Authentication --- EXAMPLES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXAMPLES.md b/EXAMPLES.md index 8fbb5e55e..fa990fe6a 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -24,7 +24,7 @@ import { AuthenticationClient } from 'auth0'; const auth = new AuthenticationClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientSecret: '{YOUR_CLIENT_SECRET}', }); From cb48e37d27b29e0b04933b170fca3d528de097be Mon Sep 17 00:00:00 2001 From: Benny Neugebauer Date: Mon, 9 Sep 2024 11:10:40 +0200 Subject: [PATCH 2/3] Highlighted region in Authentication --- EXAMPLES.md | 24 ++++++++++++------------ README.md | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/EXAMPLES.md b/EXAMPLES.md index fa990fe6a..45e7666aa 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -24,7 +24,7 @@ import { AuthenticationClient } from 'auth0'; const auth = new AuthenticationClient({ - domain: '{YOUR_TENANT}.{REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientSecret: '{YOUR_CLIENT_SECRET}', }); @@ -45,7 +45,7 @@ const clientAssertionSigningKey = `-----BEGIN PRIVATE KEY----- -----END PRIVATE KEY-----`; const auth = new AuthenticationClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientAssertionSigningKey, }); @@ -61,7 +61,7 @@ const { data: tokens } = await auth.oauth.clientCredentialsGrant({ import { AuthenticationClient } from 'auth0'; const auth = new AuthenticationClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientSecret: '{YOUR_CLIENT_SECRET}', }); @@ -85,7 +85,7 @@ await auth.oauth.revokeRefreshToken({ import { AuthenticationClient } from 'auth0'; const auth = new AuthenticationClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientSecret: '{YOUR_CLIENT_SECRET}', }); @@ -113,7 +113,7 @@ const { data: tokens } = await auth.oauth.authorizationCodeGrantWithPKCE( import { AuthenticationClient } from 'auth0'; const auth = new AuthenticationClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientSecret: '{YOUR_CLIENT_SECRET}', }); @@ -139,7 +139,7 @@ import { AuthenticationClient } from 'auth0'; const { Agent } = require('undici'); const auth = new AuthenticationClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', agent: new Agent({ connect: { cert: 'your_cert', key: 'your_key' }, @@ -160,7 +160,7 @@ const { data: tokens } = await auth.oauth.clientCredentialsGrant({ import { ManagementClient } from 'auth0'; const management = new ManagementClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientSecret: '{YOUR_CLIENT_SECRET}', }); @@ -189,7 +189,7 @@ while (true) { import { ManagementClient } from 'auth0'; const management = new ManagementClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientSecret: '{YOUR_CLIENT_SECRET}', }); @@ -213,7 +213,7 @@ import { ManagementClient } from 'auth0'; import { fileFrom } from 'fetch-blob/from.js'; const management = new ManagementClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientSecret: '{YOUR_CLIENT_SECRET}', }); @@ -249,7 +249,7 @@ while (!done) { import { ManagementClient } from 'auth0'; const management = new ManagementClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientSecret: '{YOUR_CLIENT_SECRET}', }); @@ -266,7 +266,7 @@ import https from 'https'; import { ManagementClient } from 'auth0'; const management = new ManagementClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientSecret: '{YOUR_CLIENT_SECRET}', headers: { 'foo': 'applied to all requests' }, @@ -284,7 +284,7 @@ import { ManagementClient } from 'auth0'; import { myFetch } from './fetch'; const management = new ManagementClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientSecret: '{YOUR_CLIENT_SECRET}', async fetch(url, init) { diff --git a/README.md b/README.md index a9ad48cd6..77d089867 100644 --- a/README.md +++ b/README.md @@ -49,13 +49,13 @@ See [more examples](https://github.com/auth0/node-auth0/blob/master/EXAMPLES.md# The Auth0 Management API is meant to be used by back-end servers or trusted parties performing administrative tasks. Generally speaking, anything that can be done through the Auth0 dashboard (and more) can also be done through this API. -Initialize your client class with a client ID, client secret and a domain. +Initialize your client class with a client ID, client secret and a domain. In the Auth0 dashboard, you can find the domain in your Identifier within the Auth0 Management API under Applications and APIs. ```js import { ManagementClient } from 'auth0'; var management = new ManagementClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', clientId: '{YOUR_CLIENT_ID}', clientSecret: '{YOUR_CLIENT_SECRET}', }); @@ -67,7 +67,7 @@ Or, initialize your client class with an API v2 token and a domain. import { ManagementClient } from 'auth0'; var management = new ManagementClient({ - domain: '{YOUR_TENANT_AND REGION}.auth0.com', + domain: '{YOUR_TENANT}.{YOUR_REGION}.auth0.com', token: '{YOUR_API_V2_TOKEN}', }); ``` From 8a3b811ff9baa1e68b59fa8ef3dacf6aad78c6dd Mon Sep 17 00:00:00 2001 From: Benny Neugebauer Date: Mon, 9 Sep 2024 11:17:58 +0200 Subject: [PATCH 3/3] mention domain location --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 77d089867..e3121585b 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ See [more examples](https://github.com/auth0/node-auth0/blob/master/EXAMPLES.md# The Auth0 Management API is meant to be used by back-end servers or trusted parties performing administrative tasks. Generally speaking, anything that can be done through the Auth0 dashboard (and more) can also be done through this API. -Initialize your client class with a client ID, client secret and a domain. In the Auth0 dashboard, you can find the domain in your Identifier within the Auth0 Management API under Applications and APIs. +Initialize your client class with a client ID, client secret and a domain. In the Auth0 dashboard, you can find the domain of the Auth0 Management API (System API) within the [General Settings](https://auth0.com/docs/get-started/apis/api-settings#general-settings). ```js import { ManagementClient } from 'auth0';