Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlighted region in Authentication #1034

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
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}',
});
Expand All @@ -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,
});
Expand All @@ -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}',
});
Expand All @@ -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}',
});
Expand Down Expand Up @@ -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}',
});
Expand All @@ -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' },
Expand All @@ -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}',
});
Expand Down Expand Up @@ -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}',
});
Expand All @@ -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}',
});
Expand Down Expand Up @@ -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}',
});
Expand All @@ -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' },
Expand All @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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';

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}',
});
Expand All @@ -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}',
});
```
Expand Down