@asgardeo/javascript 0.1.10 → 0.1.11

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.
@@ -22,9 +22,7 @@ import { Organization } from './organization';
22
22
  import { User, UserProfile } from './user';
23
23
  import { TokenResponse } from './token';
24
24
  import { Storage } from './store';
25
- export type SignInOptions = Record<string, unknown>;
26
- export type SignOutOptions = Record<string, unknown>;
27
- export type SignUpOptions = Record<string, unknown>;
25
+ import { SignInOptions, SignOutOptions, SignUpOptions } from './config';
28
26
  /**
29
27
  * Interface defining the core functionality for Asgardeo authentication clients.
30
28
  *
@@ -18,6 +18,36 @@
18
18
  import { I18nBundle } from './i18n';
19
19
  import { RecursivePartial } from './utility-types';
20
20
  import { ThemeConfig, ThemeMode } from '../theme/types';
21
+ /**
22
+ * Interface representing the additional parameters to be sent in the sign-in request.
23
+ * This can include custom parameters that your authorization server supports.
24
+ * These parameters will be included in the authorization request sent to the server.
25
+ * If not provided, no additional parameters will be sent.
26
+ *
27
+ * @example
28
+ * signInOptions: { prompt: "login", fidp: "OrganizationSSO" }
29
+ */
30
+ export type SignInOptions = Record<string, any>;
31
+ /**
32
+ * Interface representing the additional parameters to be sent in the sign-out request.
33
+ * This can include custom parameters that your authorization server supports.
34
+ * These parameters will be included in the sign-out request sent to the server.
35
+ * If not provided, no additional parameters will be sent.
36
+ *
37
+ * @example
38
+ * signOutOptions: { idTokenHint: "your-id-token-hint" }
39
+ */
40
+ export type SignOutOptions = Record<string, unknown>;
41
+ /**
42
+ * Interface representing the additional parameters to be sent in the sign-up request.
43
+ * This can include custom parameters that your authorization server supports.
44
+ * These parameters will be included in the sign-up request sent to the server.
45
+ * If not provided, no additional parameters will be sent.
46
+ *
47
+ * @example
48
+ * signUpOptions: { appId: "your-app-id" }
49
+ */
50
+ export type SignUpOptions = Record<string, unknown>;
21
51
  export interface BaseConfig<T = unknown> extends WithPreferences {
22
52
  /**
23
53
  * Optional URL where the authorization server should redirect after authentication.
@@ -122,6 +152,21 @@ export interface BaseConfig<T = unknown> extends WithPreferences {
122
152
  clockTolerance?: number;
123
153
  };
124
154
  };
155
+ /**
156
+ * Optional additional parameters to be sent in the authorize request.
157
+ * @see {@link SignInOptions} for more details.
158
+ */
159
+ signInOptions?: SignInOptions;
160
+ /**
161
+ * Optional additional parameters to be sent in the sign-out request.
162
+ * @see {@link SignOutOptions} for more details.
163
+ */
164
+ signOutOptions?: SignOutOptions;
165
+ /**
166
+ * Optional additional parameters to be sent in the sign-up request.
167
+ * @see {@link SignUpOptions} for more details.
168
+ */
169
+ signUpOptions?: SignUpOptions;
125
170
  }
126
171
  export interface WithPreferences {
127
172
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgardeo/javascript",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Framework agnostic JavaScript SDK for Asgardeo.",
5
5
  "keywords": [
6
6
  "asgardeo",
@@ -9,9 +9,9 @@
9
9
  "agnostic",
10
10
  "js"
11
11
  ],
12
- "homepage": "https://github.com/asgardeo/web-ui-sdks/tree/main/packages/javascript#readme",
12
+ "homepage": "https://github.com/asgardeo/javascript/tree/main/packages/javascript#readme",
13
13
  "bugs": {
14
- "url": "https://github.com/asgardeo/web-ui-sdks/issues"
14
+ "url": "https://github.com/asgardeo/javascript/issues"
15
15
  },
16
16
  "author": "WSO2",
17
17
  "license": "Apache-2.0",
@@ -30,7 +30,7 @@
30
30
  "types": "dist/index.d.ts",
31
31
  "repository": {
32
32
  "type": "git",
33
- "url": "https://github.com/asgardeo/web-ui-sdks",
33
+ "url": "https://github.com/asgardeo/javascript",
34
34
  "directory": "packages/javascript"
35
35
  },
36
36
  "devDependencies": {