@asgardeo/javascript 0.17.0 → 0.18.1
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/dist/cjs/index.js +12 -7
- package/dist/cjs/index.js.map +2 -2
- package/dist/index.js +12 -7
- package/dist/index.js.map +2 -2
- package/dist/models/v2/embedded-signin-flow-v2.d.ts +10 -0
- package/dist/models/v2/embedded-signup-flow-v2.d.ts +6 -0
- package/dist/utils/processOpenIDScopes.d.ts +7 -2
- package/package.json +1 -1
|
@@ -155,6 +155,11 @@ export interface ExtendedEmbeddedSignInFlowResponse {
|
|
|
155
155
|
* @experimental This interface is part of the new Asgardeo platform
|
|
156
156
|
*/
|
|
157
157
|
export interface EmbeddedSignInFlowResponse extends ExtendedEmbeddedSignInFlowResponse {
|
|
158
|
+
/**
|
|
159
|
+
* Per-step challenge token for replay protection.
|
|
160
|
+
* Must be included in the next request to continue this flow.
|
|
161
|
+
*/
|
|
162
|
+
challengeToken?: string;
|
|
158
163
|
/**
|
|
159
164
|
* Core response data containing UI components and flow metadata.
|
|
160
165
|
* Includes both modern meta.components structure and legacy fields for compatibility.
|
|
@@ -302,6 +307,11 @@ export interface EmbeddedSignInFlowRequest extends Partial<EmbeddedSignInFlowIni
|
|
|
302
307
|
* Corresponds to action components in the UI (e.g., submit button, social login).
|
|
303
308
|
*/
|
|
304
309
|
action?: string;
|
|
310
|
+
/**
|
|
311
|
+
* Per-step challenge token received from the previous flow response.
|
|
312
|
+
* Required when continuing an existing flow to prevent replay attacks.
|
|
313
|
+
*/
|
|
314
|
+
challengeToken?: string;
|
|
305
315
|
/**
|
|
306
316
|
* Identifier of the flow instance to continue.
|
|
307
317
|
* Required when submitting data for an existing flow.
|
|
@@ -130,6 +130,11 @@ export interface ExtendedEmbeddedSignUpFlowResponse {
|
|
|
130
130
|
* @see {@link EmbeddedSignUpFlowStatus} for available flow statuses
|
|
131
131
|
*/
|
|
132
132
|
export interface EmbeddedSignUpFlowResponse extends ExtendedEmbeddedSignUpFlowResponse {
|
|
133
|
+
/**
|
|
134
|
+
* Per-step challenge token for replay protection.
|
|
135
|
+
* Must be included in the next request to continue this flow.
|
|
136
|
+
*/
|
|
137
|
+
challengeToken?: string;
|
|
133
138
|
/**
|
|
134
139
|
* Flow data containing form inputs and available actions.
|
|
135
140
|
* This is transformed to component-driven format by the React transformer.
|
|
@@ -191,6 +196,7 @@ export type EmbeddedSignUpFlowInitiateRequest = {
|
|
|
191
196
|
*/
|
|
192
197
|
export interface EmbeddedSignUpFlowRequest extends Partial<EmbeddedSignUpFlowInitiateRequest> {
|
|
193
198
|
action?: string;
|
|
199
|
+
challengeToken?: string;
|
|
194
200
|
executionId?: string;
|
|
195
201
|
inputs?: Record<string, any>;
|
|
196
202
|
}
|
|
@@ -21,16 +21,21 @@
|
|
|
21
21
|
* If the input is an array, it joins the elements into a single string separated by spaces.
|
|
22
22
|
* If the input is neither, it throws an error.
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* Default scopes are only injected when no scopes are configured (undefined, empty string,
|
|
25
|
+
* or empty array). If the caller explicitly provides scopes, those are used as-is.
|
|
26
|
+
*
|
|
27
|
+
* @param scopes - The OpenID scopes to process, which can be a string, an array of strings,
|
|
28
|
+
* or undefined/null when not configured.
|
|
25
29
|
* @returns A string of OpenID scopes separated by spaces.
|
|
26
30
|
*
|
|
27
31
|
* @example
|
|
28
32
|
* ```typescript
|
|
29
33
|
* processOpenIDScopes("openid profile email"); // returns "openid profile email"
|
|
30
34
|
* processOpenIDScopes(["openid", "profile", "email"]); // returns "openid profile email"
|
|
35
|
+
* processOpenIDScopes(undefined); // returns default scopes
|
|
31
36
|
* processOpenIDScopes(123); // throws AsgardeoRuntimeError
|
|
32
37
|
* processOpenIDScopes({}); // throws AsgardeoRuntimeError
|
|
33
38
|
* ```
|
|
34
39
|
*/
|
|
35
|
-
declare const processOpenIDScopes: (scopes: string | string[]) => string;
|
|
40
|
+
declare const processOpenIDScopes: (scopes: string | string[] | undefined | null) => string;
|
|
36
41
|
export default processOpenIDScopes;
|