auth0 4.15.0 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/auth/backchannel.d.ts +139 -0
- package/dist/cjs/auth/backchannel.js +110 -0
- package/dist/cjs/auth/backchannel.js.map +1 -0
- package/dist/cjs/auth/index.d.ts +2 -0
- package/dist/cjs/auth/index.js +2 -0
- package/dist/cjs/auth/index.js.map +1 -1
- package/dist/cjs/deprecations.d.ts +2 -0
- package/dist/cjs/management/__generated/managers/email-templates-manager.d.ts +1 -1
- package/dist/cjs/management/__generated/managers/email-templates-manager.js +1 -1
- package/dist/cjs/management/__generated/managers/prompts-manager.d.ts +34 -6
- package/dist/cjs/management/__generated/managers/prompts-manager.js +33 -5
- package/dist/cjs/management/__generated/managers/prompts-manager.js.map +1 -1
- package/dist/cjs/management/__generated/models/index.d.ts +117 -23
- package/dist/cjs/management/__generated/models/index.js +17 -4
- package/dist/cjs/management/__generated/models/index.js.map +1 -1
- package/dist/cjs/management/management-client-options.d.ts +1 -1
- package/dist/cjs/management/token-provider-middleware.d.ts +1 -1
- package/dist/cjs/management/token-provider-middleware.js +2 -1
- package/dist/cjs/management/token-provider-middleware.js.map +1 -1
- package/dist/cjs/utils.d.ts +14 -0
- package/dist/cjs/utils.js +19 -1
- package/dist/cjs/utils.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/auth/backchannel.d.ts +139 -0
- package/dist/esm/auth/backchannel.js +106 -0
- package/dist/esm/auth/backchannel.js.map +1 -0
- package/dist/esm/auth/index.d.ts +2 -0
- package/dist/esm/auth/index.js +2 -0
- package/dist/esm/auth/index.js.map +1 -1
- package/dist/esm/deprecations.d.ts +2 -0
- package/dist/esm/management/__generated/managers/email-templates-manager.d.ts +1 -1
- package/dist/esm/management/__generated/managers/email-templates-manager.js +1 -1
- package/dist/esm/management/__generated/managers/prompts-manager.d.ts +34 -6
- package/dist/esm/management/__generated/managers/prompts-manager.js +33 -5
- package/dist/esm/management/__generated/managers/prompts-manager.js.map +1 -1
- package/dist/esm/management/__generated/models/index.d.ts +117 -23
- package/dist/esm/management/__generated/models/index.js +13 -0
- package/dist/esm/management/__generated/models/index.js.map +1 -1
- package/dist/esm/management/management-client-options.d.ts +1 -1
- package/dist/esm/management/token-provider-middleware.d.ts +1 -1
- package/dist/esm/management/token-provider-middleware.js +2 -1
- package/dist/esm/management/token-provider-middleware.js.map +1 -1
- package/dist/esm/utils.d.ts +14 -0
- package/dist/esm/utils.js +17 -0
- package/dist/esm/utils.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ This client can be used to access Auth0's [Authentication API](https://auth0.com
|
|
|
37
37
|
import { AuthenticationClient } from 'auth0';
|
|
38
38
|
|
|
39
39
|
const auth0 = new AuthenticationClient({
|
|
40
|
-
domain: '{
|
|
40
|
+
domain: '{YOUR_TENANT_AND REGION}.auth0.com',
|
|
41
41
|
clientId: '{OPTIONAL_CLIENT_ID}',
|
|
42
42
|
clientSecret: '{OPTIONAL_CLIENT_SECRET}',
|
|
43
43
|
});
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { BaseAuthAPI } from './base-auth-api.js';
|
|
2
|
+
/**
|
|
3
|
+
* The response from the authorize endpoint.
|
|
4
|
+
*/
|
|
5
|
+
export type AuthorizeResponse = {
|
|
6
|
+
/**
|
|
7
|
+
* The authorization request ID.
|
|
8
|
+
*/
|
|
9
|
+
auth_req_id: string;
|
|
10
|
+
/**
|
|
11
|
+
* The duration in seconds until the authentication request expires.
|
|
12
|
+
*/
|
|
13
|
+
expires_in: number;
|
|
14
|
+
/**
|
|
15
|
+
* The interval in seconds to wait between poll requests.
|
|
16
|
+
*/
|
|
17
|
+
interval: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Options for the authorize request.
|
|
21
|
+
*/
|
|
22
|
+
export type AuthorizeOptions = {
|
|
23
|
+
/**
|
|
24
|
+
* A human-readable string intended to be displayed on both the device calling /bc-authorize and the user’s authentication device.
|
|
25
|
+
*/
|
|
26
|
+
binding_message: string;
|
|
27
|
+
/**
|
|
28
|
+
* A space-separated list of OIDC and custom API scopes.
|
|
29
|
+
*/
|
|
30
|
+
scope: string;
|
|
31
|
+
/**
|
|
32
|
+
* Unique identifier of the audience for an issued token.
|
|
33
|
+
*/
|
|
34
|
+
audience?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Custom expiry time in seconds for this request.
|
|
37
|
+
*/
|
|
38
|
+
request_expiry?: string;
|
|
39
|
+
/**
|
|
40
|
+
* The user ID.
|
|
41
|
+
*/
|
|
42
|
+
userId: string;
|
|
43
|
+
/**
|
|
44
|
+
* Optional parameter for subject issuer context.
|
|
45
|
+
*/
|
|
46
|
+
subjectIssuerContext?: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The response from the token endpoint.
|
|
50
|
+
*/
|
|
51
|
+
export type TokenResponse = {
|
|
52
|
+
/**
|
|
53
|
+
* The access token.
|
|
54
|
+
*/
|
|
55
|
+
access_token: string;
|
|
56
|
+
/**
|
|
57
|
+
* The refresh token, available with the `offline_access` scope.
|
|
58
|
+
*/
|
|
59
|
+
refresh_token?: string;
|
|
60
|
+
/**
|
|
61
|
+
* The user's ID Token.
|
|
62
|
+
*/
|
|
63
|
+
id_token: string;
|
|
64
|
+
/**
|
|
65
|
+
* The token type of the access token.
|
|
66
|
+
*/
|
|
67
|
+
token_type?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The duration in seconds that the access token is valid.
|
|
70
|
+
*/
|
|
71
|
+
expires_in: number;
|
|
72
|
+
/**
|
|
73
|
+
* The scopes associated with the token.
|
|
74
|
+
*/
|
|
75
|
+
scope: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Options for the token request.
|
|
79
|
+
*/
|
|
80
|
+
export type TokenOptions = {
|
|
81
|
+
/**
|
|
82
|
+
* The authorization request ID.
|
|
83
|
+
*/
|
|
84
|
+
auth_req_id: string;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Interface for the backchannel authentication.
|
|
88
|
+
*/
|
|
89
|
+
export interface IBackchannel {
|
|
90
|
+
authorize: (options: AuthorizeOptions) => Promise<AuthorizeResponse>;
|
|
91
|
+
backchannelGrant: (options: TokenOptions) => Promise<TokenResponse>;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Class implementing the backchannel authentication flow.
|
|
95
|
+
*/
|
|
96
|
+
export declare class Backchannel extends BaseAuthAPI implements IBackchannel {
|
|
97
|
+
/**
|
|
98
|
+
* Initiates a CIBA authorization request.
|
|
99
|
+
*
|
|
100
|
+
* @param {AuthorizeOptions} options - The options for the request.
|
|
101
|
+
* @returns {Promise<AuthorizeResponse>} - The authorization response.
|
|
102
|
+
*
|
|
103
|
+
* @throws {Error} - If the request fails.
|
|
104
|
+
*/
|
|
105
|
+
authorize({ userId, ...options }: AuthorizeOptions): Promise<AuthorizeResponse>;
|
|
106
|
+
/**
|
|
107
|
+
* Handles the backchannel grant flow for authentication. Client can poll this method at regular intervals to check if the backchannel auth request has been approved.
|
|
108
|
+
*
|
|
109
|
+
* @param {string} auth_req_id - The authorization request ID. This value is returned from the call to /bc-authorize. Once you have exchanged an auth_req_id for an ID and access token, it is no longer usable.
|
|
110
|
+
* @returns {Promise<TokenResponse>} - A promise that resolves to the token response.
|
|
111
|
+
*
|
|
112
|
+
* @throws {Error} - Throws an error if the request fails.
|
|
113
|
+
*
|
|
114
|
+
* If the authorizing user has not yet approved or rejected the request, you will receive a response like this:
|
|
115
|
+
* ```json
|
|
116
|
+
* {
|
|
117
|
+
* "error": "authorization_pending",
|
|
118
|
+
* "error_description": "The end-user authorization is pending"
|
|
119
|
+
* }
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* If the authorizing user rejects the request, you will receive a response like this:
|
|
123
|
+
* ```json
|
|
124
|
+
* {
|
|
125
|
+
* "error": "access_denied",
|
|
126
|
+
* "error_description": "The end-user denied the authorization request or it has been expired"
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* If you are polling too quickly (faster than the interval value returned from /bc-authorize), you will receive a response like this:
|
|
131
|
+
* ```json
|
|
132
|
+
* {
|
|
133
|
+
* "error": "slow_down",
|
|
134
|
+
* "error_description": "You are polling faster than allowed. Try again in 10 seconds."
|
|
135
|
+
* }
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
backchannelGrant({ auth_req_id }: TokenOptions): Promise<TokenResponse>;
|
|
139
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Wednesday, 8 January, 2025
|
|
3
|
+
// Client Initiated Backchannel Authentication (CIBA)
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Backchannel = void 0;
|
|
6
|
+
// CIBA is an OpenID Foundation standard for a decoupled authentication flow. It enables
|
|
7
|
+
// solution developers to build authentication flows where the user logging in does not do so
|
|
8
|
+
// directly on the device that receives the ID or access tokens (the “Consumption Device”), but
|
|
9
|
+
// instead on a separate “Authorization Device”.
|
|
10
|
+
const models_js_1 = require("../lib/models.js");
|
|
11
|
+
const base_auth_api_js_1 = require("./base-auth-api.js");
|
|
12
|
+
/**
|
|
13
|
+
* Generates the login hint for the user.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} userId - The user ID.
|
|
16
|
+
* @param {string} domain - The tenant domain.
|
|
17
|
+
* @returns {string} - The login hint as a JSON string.
|
|
18
|
+
*/
|
|
19
|
+
const getLoginHint = (userId, domain) => {
|
|
20
|
+
// remove trailing '/' from domain, added later for uniformity
|
|
21
|
+
const trimmedDomain = domain.endsWith('/') ? domain.slice(0, -1) : domain;
|
|
22
|
+
const loginHint = {
|
|
23
|
+
format: 'iss_sub',
|
|
24
|
+
iss: `https://${trimmedDomain}/`,
|
|
25
|
+
sub: `${userId}`,
|
|
26
|
+
};
|
|
27
|
+
return JSON.stringify(loginHint);
|
|
28
|
+
};
|
|
29
|
+
const CIBA_GRANT_TYPE = 'urn:openid:params:grant-type:ciba';
|
|
30
|
+
const CIBA_AUTHORIZE_URL = '/bc-authorize';
|
|
31
|
+
const CIBA_TOKEN_URL = '/oauth/token';
|
|
32
|
+
/**
|
|
33
|
+
* Class implementing the backchannel authentication flow.
|
|
34
|
+
*/
|
|
35
|
+
class Backchannel extends base_auth_api_js_1.BaseAuthAPI {
|
|
36
|
+
/**
|
|
37
|
+
* Initiates a CIBA authorization request.
|
|
38
|
+
*
|
|
39
|
+
* @param {AuthorizeOptions} options - The options for the request.
|
|
40
|
+
* @returns {Promise<AuthorizeResponse>} - The authorization response.
|
|
41
|
+
*
|
|
42
|
+
* @throws {Error} - If the request fails.
|
|
43
|
+
*/
|
|
44
|
+
async authorize({ userId, ...options }) {
|
|
45
|
+
const body = {
|
|
46
|
+
...options,
|
|
47
|
+
login_hint: getLoginHint(userId, this.domain),
|
|
48
|
+
client_id: this.clientId,
|
|
49
|
+
};
|
|
50
|
+
await this.addClientAuthentication(body);
|
|
51
|
+
const response = await this.request.bind(this)({
|
|
52
|
+
path: CIBA_AUTHORIZE_URL,
|
|
53
|
+
method: 'POST',
|
|
54
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
55
|
+
body: new URLSearchParams(body),
|
|
56
|
+
}, {});
|
|
57
|
+
const r = await models_js_1.JSONApiResponse.fromResponse(response);
|
|
58
|
+
return r.data;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Handles the backchannel grant flow for authentication. Client can poll this method at regular intervals to check if the backchannel auth request has been approved.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} auth_req_id - The authorization request ID. This value is returned from the call to /bc-authorize. Once you have exchanged an auth_req_id for an ID and access token, it is no longer usable.
|
|
64
|
+
* @returns {Promise<TokenResponse>} - A promise that resolves to the token response.
|
|
65
|
+
*
|
|
66
|
+
* @throws {Error} - Throws an error if the request fails.
|
|
67
|
+
*
|
|
68
|
+
* If the authorizing user has not yet approved or rejected the request, you will receive a response like this:
|
|
69
|
+
* ```json
|
|
70
|
+
* {
|
|
71
|
+
* "error": "authorization_pending",
|
|
72
|
+
* "error_description": "The end-user authorization is pending"
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* If the authorizing user rejects the request, you will receive a response like this:
|
|
77
|
+
* ```json
|
|
78
|
+
* {
|
|
79
|
+
* "error": "access_denied",
|
|
80
|
+
* "error_description": "The end-user denied the authorization request or it has been expired"
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* If you are polling too quickly (faster than the interval value returned from /bc-authorize), you will receive a response like this:
|
|
85
|
+
* ```json
|
|
86
|
+
* {
|
|
87
|
+
* "error": "slow_down",
|
|
88
|
+
* "error_description": "You are polling faster than allowed. Try again in 10 seconds."
|
|
89
|
+
* }
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
async backchannelGrant({ auth_req_id }) {
|
|
93
|
+
const body = {
|
|
94
|
+
client_id: this.clientId,
|
|
95
|
+
auth_req_id,
|
|
96
|
+
grant_type: CIBA_GRANT_TYPE,
|
|
97
|
+
};
|
|
98
|
+
await this.addClientAuthentication(body);
|
|
99
|
+
const response = await this.request.bind(this)({
|
|
100
|
+
path: CIBA_TOKEN_URL,
|
|
101
|
+
method: 'POST',
|
|
102
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
103
|
+
body: new URLSearchParams(body),
|
|
104
|
+
}, {});
|
|
105
|
+
const r = await models_js_1.JSONApiResponse.fromResponse(response);
|
|
106
|
+
return r.data;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.Backchannel = Backchannel;
|
|
110
|
+
//# sourceMappingURL=backchannel.js.map
|
|
@@ -0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C5C;YACE,IAAI,EAAE,kBAAkB;YACxB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,mCAAmC,EAAE;YAChE,IAAI,EAAE,IAAI,eAAe,CAAC,IAAI,CAAC;SAChC,EACD,EAAE,CACH,CAAC;QAEF,MAAM,CAAC,GAAuC,MAAM,2BAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC3F,OAAO,CAAC,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,KAAK,CAAC,gBAAgB,CAAC,EAAE,WAAW,EAAgB;QAClD,MAAM,IAAI,GAAqB;YAC7B,SAAS,EAAE,IAAI,CAAC,QAAQ;YACxB,WAAW;YACX,UAAU,EAAE,eAAe;SAC5B,CAAC;QAEF,MAAM,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;QAEzC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAC5C;YACE,IAAI,EAAE,cAAc;YACpB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,mCAAmC,EAAE;YAChE,IAAI,EAAE,IAAI,eAAe,CAAC,IAAI,CAAC;SAChC,EACD,EAAE,CACH,CAAC;QAEF,MAAM,CAAC,GAAmC,MAAM,2BAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QACvF,OAAO,CAAC,CAAC,IAAI,CAAC;IAChB,CAAC;CACF;AAtFD,kCAsFC"}
|
package/dist/cjs/auth/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Backchannel } from './backchannel.js';
|
|
1
2
|
import { AuthenticationClientOptions } from './base-auth-api.js';
|
|
2
3
|
import { Database } from './database.js';
|
|
3
4
|
import { OAuth } from './oauth.js';
|
|
@@ -11,5 +12,6 @@ export declare class AuthenticationClient {
|
|
|
11
12
|
database: Database;
|
|
12
13
|
oauth: OAuth;
|
|
13
14
|
passwordless: Passwordless;
|
|
15
|
+
backchannel: Backchannel;
|
|
14
16
|
constructor(options: AuthenticationClientOptions);
|
|
15
17
|
}
|
package/dist/cjs/auth/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.AuthenticationClient = exports.AuthApiError = exports.IdTokenValidatorError = void 0;
|
|
18
|
+
const backchannel_js_1 = require("./backchannel.js");
|
|
18
19
|
const database_js_1 = require("./database.js");
|
|
19
20
|
const oauth_js_1 = require("./oauth.js");
|
|
20
21
|
const passwordless_js_1 = require("./passwordless.js");
|
|
@@ -30,6 +31,7 @@ class AuthenticationClient {
|
|
|
30
31
|
this.database = new database_js_1.Database(options);
|
|
31
32
|
this.oauth = new oauth_js_1.OAuth(options);
|
|
32
33
|
this.passwordless = new passwordless_js_1.Passwordless(options);
|
|
34
|
+
this.backchannel = new backchannel_js_1.Backchannel(options);
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
exports.AuthenticationClient = AuthenticationClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAA+C;AAE/C,+CAAyC;AACzC,yCAAmC;AACnC,uDAAiD;AAEjD,gDAA8B;AAC9B,6CAA2B;AAC3B,oDAAkC;AAClC,iEAAwF;AAAvD,8HAAA,qBAAqB,OAAA;AACtD,uDAA+E;AAAtE,gHAAA,YAAY,OAAA;AAErB,MAAa,oBAAoB;IAM/B,YAAY,OAAoC;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,sBAAQ,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,gBAAK,CAAC,OAAO,CAAC,CAAC;QAChC,IAAI,CAAC,YAAY,GAAG,IAAI,8BAAY,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,CAAC,WAAW,GAAG,IAAI,4BAAW,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF;AAZD,oDAYC"}
|
|
@@ -15,6 +15,7 @@ export declare const PatchProviderRequestNameEnum: {
|
|
|
15
15
|
readonly smtp: "smtp";
|
|
16
16
|
readonly azure_cs: "azure_cs";
|
|
17
17
|
readonly ms365: "ms365";
|
|
18
|
+
readonly custom: "custom";
|
|
18
19
|
};
|
|
19
20
|
/**
|
|
20
21
|
* @deprecated Use {@link EmailProviderCreate} instead.
|
|
@@ -32,6 +33,7 @@ export declare const PostProviderRequestNameEnum: {
|
|
|
32
33
|
readonly smtp: "smtp";
|
|
33
34
|
readonly azure_cs: "azure_cs";
|
|
34
35
|
readonly ms365: "ms365";
|
|
36
|
+
readonly custom: "custom";
|
|
35
37
|
};
|
|
36
38
|
/**
|
|
37
39
|
* @deprecated Use {@link EmailProviderUpdateCredentials} instead.
|
|
@@ -7,7 +7,7 @@ declare const BaseAPI: typeof runtime.BaseAPI;
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class EmailTemplatesManager extends BaseAPI {
|
|
9
9
|
/**
|
|
10
|
-
* Retrieve an email template by pre-defined name. These names are `verify_email`, `verify_email_by_code`, `reset_email`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, and `user_invitation`. The names `change_password`, and `password_reset` are also supported for legacy scenarios.
|
|
10
|
+
* Retrieve an email template by pre-defined name. These names are `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, and `user_invitation`. The names `change_password`, and `password_reset` are also supported for legacy scenarios.
|
|
11
11
|
* Get an email template
|
|
12
12
|
*
|
|
13
13
|
* @throws {RequiredError}
|
|
@@ -31,7 +31,7 @@ const { BaseAPI } = runtime;
|
|
|
31
31
|
*/
|
|
32
32
|
class EmailTemplatesManager extends BaseAPI {
|
|
33
33
|
/**
|
|
34
|
-
* Retrieve an email template by pre-defined name. These names are `verify_email`, `verify_email_by_code`, `reset_email`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, and `user_invitation`. The names `change_password`, and `password_reset` are also supported for legacy scenarios.
|
|
34
|
+
* Retrieve an email template by pre-defined name. These names are `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, and `user_invitation`. The names `change_password`, and `password_reset` are also supported for legacy scenarios.
|
|
35
35
|
* Get an email template
|
|
36
36
|
*
|
|
37
37
|
* @throws {RequiredError}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as runtime from '../../../lib/runtime.js';
|
|
2
2
|
import type { InitOverride, ApiResponse } from '../../../lib/runtime.js';
|
|
3
|
-
import type { GetRendering200Response, PatchRenderingRequest, PromptsSettings, PromptsSettingsUpdate, GetCustomTextByLanguageRequest, GetPartialsRequest, GetRenderingRequest, PatchRenderingOperationRequest, PutCustomTextByLanguageRequest, PutPartialsRequest } from '../models/index.js';
|
|
3
|
+
import type { GetRendering200Response, PatchRendering200Response, PatchRenderingRequest, PromptsSettings, PromptsSettingsUpdate, GetCustomTextByLanguageRequest, GetPartialsRequest, GetRenderingRequest, PatchRenderingOperationRequest, PutCustomTextByLanguageRequest, PutPartialsRequest } from '../models/index.js';
|
|
4
4
|
declare const BaseAPI: typeof runtime.BaseAPI;
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
@@ -32,8 +32,8 @@ export declare class PromptsManager extends BaseAPI {
|
|
|
32
32
|
*/
|
|
33
33
|
get(initOverrides?: InitOverride): Promise<ApiResponse<PromptsSettings>>;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
* Get render settings for a
|
|
35
|
+
* Get render settings for a screen.
|
|
36
|
+
* Get render settings for a screen
|
|
37
37
|
*
|
|
38
38
|
* @throws {RequiredError}
|
|
39
39
|
*/
|
|
@@ -46,12 +46,40 @@ export declare class PromptsManager extends BaseAPI {
|
|
|
46
46
|
*/
|
|
47
47
|
update(bodyParameters: PromptsSettingsUpdate, initOverrides?: InitOverride): Promise<ApiResponse<PromptsSettings>>;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
49
|
+
* Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization.
|
|
50
|
+
*
|
|
51
|
+
* <p>
|
|
52
|
+
* Example <code>head_tags</code> array. See our <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>documentation</a> on using Liquid variables within head tags.
|
|
53
|
+
* </p>
|
|
54
|
+
* <pre>{
|
|
55
|
+
* "head_tags": [
|
|
56
|
+
* {
|
|
57
|
+
* "tag": "script",
|
|
58
|
+
* "attributes": {
|
|
59
|
+
* "defer": true,
|
|
60
|
+
* "src": "URL_TO_ASSET",
|
|
61
|
+
* "async": true,
|
|
62
|
+
* "integrity": [
|
|
63
|
+
* "ASSET_SHA"
|
|
64
|
+
* ]
|
|
65
|
+
* }
|
|
66
|
+
* },
|
|
67
|
+
* {
|
|
68
|
+
* "tag": "link",
|
|
69
|
+
* "attributes": {
|
|
70
|
+
* "href": "URL_TO_ASSET",
|
|
71
|
+
* "rel": "stylesheet"
|
|
72
|
+
* }
|
|
73
|
+
* }
|
|
74
|
+
* ]
|
|
75
|
+
* }
|
|
76
|
+
* </pre>
|
|
77
|
+
*
|
|
78
|
+
* Update render settings for a screen
|
|
51
79
|
*
|
|
52
80
|
* @throws {RequiredError}
|
|
53
81
|
*/
|
|
54
|
-
updateRendering(requestParameters: PatchRenderingOperationRequest, bodyParameters: PatchRenderingRequest, initOverrides?: InitOverride): Promise<ApiResponse<
|
|
82
|
+
updateRendering(requestParameters: PatchRenderingOperationRequest, bodyParameters: PatchRenderingRequest, initOverrides?: InitOverride): Promise<ApiResponse<PatchRendering200Response>>;
|
|
55
83
|
/**
|
|
56
84
|
* Set custom text for a specific prompt. Existing texts will be overwritten.
|
|
57
85
|
* Set custom text for a specific prompt
|
|
@@ -74,8 +74,8 @@ class PromptsManager extends BaseAPI {
|
|
|
74
74
|
return runtime.JSONApiResponse.fromResponse(response);
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
78
|
-
* Get render settings for a
|
|
77
|
+
* Get render settings for a screen.
|
|
78
|
+
* Get render settings for a screen
|
|
79
79
|
*
|
|
80
80
|
* @throws {RequiredError}
|
|
81
81
|
*/
|
|
@@ -107,8 +107,36 @@ class PromptsManager extends BaseAPI {
|
|
|
107
107
|
return runtime.JSONApiResponse.fromResponse(response);
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
110
|
+
* Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization.
|
|
111
|
+
*
|
|
112
|
+
* <p>
|
|
113
|
+
* Example <code>head_tags</code> array. See our <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>documentation</a> on using Liquid variables within head tags.
|
|
114
|
+
* </p>
|
|
115
|
+
* <pre>{
|
|
116
|
+
* "head_tags": [
|
|
117
|
+
* {
|
|
118
|
+
* "tag": "script",
|
|
119
|
+
* "attributes": {
|
|
120
|
+
* "defer": true,
|
|
121
|
+
* "src": "URL_TO_ASSET",
|
|
122
|
+
* "async": true,
|
|
123
|
+
* "integrity": [
|
|
124
|
+
* "ASSET_SHA"
|
|
125
|
+
* ]
|
|
126
|
+
* }
|
|
127
|
+
* },
|
|
128
|
+
* {
|
|
129
|
+
* "tag": "link",
|
|
130
|
+
* "attributes": {
|
|
131
|
+
* "href": "URL_TO_ASSET",
|
|
132
|
+
* "rel": "stylesheet"
|
|
133
|
+
* }
|
|
134
|
+
* }
|
|
135
|
+
* ]
|
|
136
|
+
* }
|
|
137
|
+
* </pre>
|
|
138
|
+
*
|
|
139
|
+
* Update render settings for a screen
|
|
112
140
|
*
|
|
113
141
|
* @throws {RequiredError}
|
|
114
142
|
*/
|
|
@@ -124,7 +152,7 @@ class PromptsManager extends BaseAPI {
|
|
|
124
152
|
headers: headerParameters,
|
|
125
153
|
body: bodyParameters,
|
|
126
154
|
}, initOverrides);
|
|
127
|
-
return runtime.
|
|
155
|
+
return runtime.JSONApiResponse.fromResponse(response);
|
|
128
156
|
}
|
|
129
157
|
/**
|
|
130
158
|
* Set custom text for a specific prompt. Existing texts will be overwritten.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts-manager.js","sourceRoot":"","sources":["../../../../../src/management/__generated/managers/prompts-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;
|
|
1
|
+
{"version":3,"file":"prompts-manager.js","sourceRoot":"","sources":["../../../../../src/management/__generated/managers/prompts-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;AAgBnD,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;AAE5B;;GAEG;AACH,MAAa,cAAe,SAAQ,OAAO;IACzC;;;;;OAKG;IACH,KAAK,CAAC,uBAAuB,CAC3B,iBAAiD,EACjD,aAA4B;QAE5B,OAAO,CAAC,6BAA6B,CAAC,iBAAiB,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;QAEjF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CACjC;YACE,IAAI,EAAE,0CAA0C;iBAC7C,OAAO,CAAC,UAAU,EAAE,kBAAkB,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAA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