New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@logto/client

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@logto/client - npm Package Compare versions

Comparing version 2.6.7 to 2.6.8

12

lib/types/index.d.ts

@@ -42,2 +42,8 @@ import { Prompt } from '@logto/js';

prompt?: Prompt | Prompt[];
/**
* Whether to include reserved scopes (`openid`, `offline_access` and `profile`) in the scopes.
*
* @default true
*/
includeReservedScopes?: boolean;
};

@@ -47,4 +53,6 @@ /**

*
* - Add default scopes (`openid`, `offline_access` and `profile`) if not provided.
* - Add {@link ReservedResource.Organization} to resources if {@link UserScope.Organizations} is included in scopes.
* - Add default scopes (`openid`, `offline_access` and `profile`) if not provided and
* `includeReservedScopes` is `true`.
* - Add {@link ReservedResource.Organization} to resources if {@link UserScope.Organizations} is
* included in scopes.
*

@@ -51,0 +59,0 @@ * @param config The Logto client configuration to be normalized.

11

lib/types/index.js

@@ -1,2 +0,2 @@

import { Prompt, withDefaultScopes, UserScope, ReservedResource, isArbitraryObject } from '@logto/js';
import { Prompt, withReservedScopes, UserScope, ReservedResource, isArbitraryObject } from '@logto/js';
import { deduplicate } from '@silverhand/essentials';

@@ -7,4 +7,6 @@

*
* - Add default scopes (`openid`, `offline_access` and `profile`) if not provided.
* - Add {@link ReservedResource.Organization} to resources if {@link UserScope.Organizations} is included in scopes.
* - Add default scopes (`openid`, `offline_access` and `profile`) if not provided and
* `includeReservedScopes` is `true`.
* - Add {@link ReservedResource.Organization} to resources if {@link UserScope.Organizations} is
* included in scopes.
*

@@ -16,6 +18,7 @@ * @param config The Logto client configuration to be normalized.

const { prompt = Prompt.Consent, scopes = [], resources, ...rest } = config;
const includeReservedScopes = config.includeReservedScopes ?? true;
return {
...rest,
prompt,
scopes: withDefaultScopes(scopes).split(' '),
scopes: includeReservedScopes ? withReservedScopes(scopes).split(' ') : scopes,
resources: scopes.includes(UserScope.Organizations)

@@ -22,0 +25,0 @@ ? deduplicate([...(resources ?? []), ReservedResource.Organization])

{
"name": "@logto/client",
"version": "2.6.7",
"version": "2.6.8",
"type": "module",

@@ -35,3 +35,3 @@ "main": "./lib/index.cjs",

"jose": "^5.2.2",
"@logto/js": "^4.1.1"
"@logto/js": "^4.1.2"
},

@@ -38,0 +38,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc