@logto/client 3.1.3 → 3.1.5

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/lib/client.js CHANGED
@@ -174,7 +174,7 @@ class StandardLogtoClient {
174
174
  : options;
175
175
  const redirectUri = redirectUriUrl.toString();
176
176
  const postRedirectUri = postRedirectUriUrl?.toString();
177
- const { appId: clientId, prompt: promptViaConfig, resources, scopes } = this.logtoConfig;
177
+ const { appId: clientId, prompt: promptViaConfig, resources, scopes, includeReservedScopes, } = this.logtoConfig;
178
178
  const { authorizationEndpoint } = await this.getOidcConfig();
179
179
  const [codeVerifier, state] = await Promise.all([
180
180
  this.adapter.generateCodeVerifier(),
@@ -196,6 +196,7 @@ class StandardLogtoClient {
196
196
  loginHint,
197
197
  directSignIn,
198
198
  extraParams,
199
+ includeReservedScopes,
199
200
  });
200
201
  await Promise.all([
201
202
  this.setSignInSession({ redirectUri, postRedirectUri, codeVerifier, state }),
package/lib/mock.d.ts CHANGED
@@ -32,6 +32,7 @@ export declare const mockedSignInUri: string;
32
32
  export declare const mockedSignInUriWithLoginPrompt: string;
33
33
  export declare const mockedSignUpUri: string;
34
34
  export declare const mockedSignInUriWithLoginHint: string;
35
+ export declare const mockedSignInUriWithoutReservedScopes: string;
35
36
  export declare const accessToken = "access_token_value";
36
37
  export declare const refreshToken = "new_refresh_token_value";
37
38
  export declare const idToken = "id_token_value";
@@ -53,7 +54,7 @@ export declare const createAdapters: (withCache?: boolean) => {
53
54
  generateCodeVerifier: Mock<() => string>;
54
55
  generateState: Mock<() => string>;
55
56
  };
56
- export declare const createClient: (prompt?: Prompt, storage?: MockedStorage, withCache?: boolean, scopes?: string[]) => LogtoClientWithAccessors;
57
+ export declare const createClient: (prompt?: Prompt, storage?: MockedStorage, withCache?: boolean, scopes?: string[], includeReservedScopes?: boolean) => LogtoClientWithAccessors;
57
58
  /**
58
59
  * Make protected fields accessible for test
59
60
  */
@@ -22,6 +22,7 @@ const normalizeLogtoConfig = (config) => {
22
22
  resources: scopes.includes(UserScope.Organizations)
23
23
  ? deduplicate([...(resources ?? []), ReservedResource.Organization])
24
24
  : resources,
25
+ includeReservedScopes,
25
26
  };
26
27
  };
27
28
  const isLogtoSignInSessionItem = (data) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/client",
3
- "version": "3.1.3",
3
+ "version": "3.1.5",
4
4
  "type": "module",
5
5
  "module": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "@silverhand/essentials": "^2.9.2",
25
25
  "camelcase-keys": "^9.1.3",
26
26
  "jose": "^5.2.2",
27
- "@logto/js": "^6.0.0"
27
+ "@logto/js": "^6.1.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@silverhand/eslint-config": "^6.0.1",
@@ -32,9 +32,9 @@
32
32
  "@types/node": "^22.0.0",
33
33
  "@vitest/coverage-v8": "^2.1.9",
34
34
  "eslint": "^8.57.0",
35
- "happy-dom": "^16.0.0",
35
+ "happy-dom": "^20.0.8",
36
36
  "lint-staged": "^15.0.0",
37
- "nock": "14.0.0-beta.19",
37
+ "nock": "14.0.10",
38
38
  "prettier": "^3.0.0",
39
39
  "typescript": "^5.3.3",
40
40
  "vitest": "^2.1.9"