@asgardeo/javascript 0.17.0 → 0.18.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.
@@ -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
- * @param scopes - The OpenID scopes to process, which can be a string or an array of strings.
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgardeo/javascript",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Framework agnostic JavaScript SDK for Asgardeo.",
5
5
  "keywords": [
6
6
  "asgardeo",