descope / node-sdk Goto Github PK
View Code? Open in Web Editor NEWNode.js library used to integrate with Descope
Home Page: https://docs.descope.com
License: MIT License
Node.js library used to integrate with Descope
Home Page: https://docs.descope.com
License: MIT License
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (local>descope/renovate-config)
There are two issues when deploying this library to Cloudflare edge runtime. The first is documented here, the second is in one of its dependencies @descope/core-js-sdk and is documented here: descope/descope-js#338
In this library, there is a wrapper for fetch
in https://github.com/descope/node-sdk/blob/main/lib/fetch-polyfill.ts that uses node-fetch-commonjs
. By requiring this library, it requires various Node-only libraries like http
, https
, zlib
, etc. These are not available on Cloudflare, so loading the library fails.
However, Cloudflare has its own native version of fetch
that is just as suitable for our purposes, so we just need a different way of detecting whether fetch exists, and dynamically loading node-fetch if not.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Warning
These dependencies are deprecated:
Datasource | Name | Replacement PR? |
---|---|---|
npm | rollup-plugin-terser |
These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.
@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)These updates await pending status checks. To force their creation now, click the checkbox below.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
.github/actions/setup/action.yml
actions/setup-node v4
actions/cache v4
.github/workflows/ci.yml
actions/checkout v4
actions/setup-node v4
actions/checkout v4
actions/setup-node v4
actions/checkout v4
actions/setup-node v4
actions/checkout v4
actions/setup-node v4
.github/workflows/codeql.yml
actions/checkout v4
github/codeql-action v2
github/codeql-action v2
github/codeql-action v2
.github/workflows/publish-next.yml
actions/checkout v4
actions/setup-node v4
.github/workflows/publish.yml
actions/checkout v4
actions/setup-node v4
.github/workflows/release.yml
actions/checkout v4
tibdex/github-app-token v2
package.json
@descope/core-js-sdk 2.23.4
cross-fetch ^4.0.0
jose 5.2.2
tslib ^2.0.0
@rollup/plugin-commonjs ^25.0.0
@rollup/plugin-json ^4.1.0
@rollup/plugin-node-resolve ^13.3.0
@rollup/plugin-replace ^5.0.0
@rollup/plugin-typescript ^8.3.0
@size-limit/preset-small-lib ^11.0.0
@types/jest ^29.0.0
@types/jsonwebtoken ^9.0.0
@types/node ^20.0.0
@typescript-eslint/eslint-plugin ^5.25.0
@typescript-eslint/parser ^5.27.0
eslint ^8.15.0
eslint-config-airbnb-base ^15.0.0
eslint-config-airbnb-typescript ^17.0.0
eslint-config-prettier ^9.0.0
eslint-import-resolver-typescript ^3.0.0
eslint-plugin-import ^2.26.0
eslint-plugin-jest ^27.0.0
eslint-plugin-jest-dom ^5.0.0
eslint-plugin-jest-formatting ^3.1.0
eslint-plugin-no-only-tests ^3.0.0
eslint-plugin-prefer-arrow ^1.2.3
eslint-plugin-prettier ^4.0.0
husky ^8.0.1
jest ^29.0.0
jsdoc ^4.0.0
lint-staged ^15.0.0
nock ^13.2.4
prettier ^2.8.8
pretty-quick ^3.1.3
rollup ^2.62.0
rollup-plugin-auto-external ^2.0.0
rollup-plugin-browsersync ^1.3.3
rollup-plugin-define ^1.0.1
rollup-plugin-delete ^2.0.0
rollup-plugin-dts ^4.2.2
rollup-plugin-esbuild ^6.0.0
rollup-plugin-inject-process-env ^1.3.1
rollup-plugin-livereload ^2.0.5
rollup-plugin-terser ^7.0.2
ts-jest ^29.0.0
ts-node ^10.8.2
typescript ^4.6.4
node >= 12.0.0
We should have input validations in the node-sdk like we have for the core-sdk (we should use the same infra)
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (local>descope/renovate-config)
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are awaiting their schedule. Click on a checkbox to get an update now.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
.github/actions/setup/action.yml
actions/setup-node v3
actions/cache v3
.github/workflows/build_docker.yml
actions/checkout v3
actions/setup-node v3
docker/login-action f054a8b539a109f9f41c372932f1ae047eff08c9
.github/workflows/ci.yml
actions/checkout v3
actions/setup-node v3
actions/checkout v3
actions/setup-node v3
actions/checkout v3
actions/setup-node v3
actions/checkout v3
actions/setup-node v3
devmasx/coverage-check-action v1.2.0
.github/workflows/publish.yml
actions/checkout v3
actions/setup-node v3
.github/workflows/release.yml
actions/checkout v3
.github/workflows/sizing.yml
actions/checkout v3
andresz1/size-limit-action v1
package.json
@descope/core-js-sdk 0.0.41-alpha.10
jose 4.8.1
node-fetch 2.6.7
@rollup/plugin-commonjs ^22.0.0
@rollup/plugin-json ^4.1.0
@rollup/plugin-node-resolve ^13.3.0
@rollup/plugin-replace ^4.0.0
@rollup/plugin-typescript ^8.3.0
@size-limit/preset-small-lib ^8.0.0
@types/jest ^28.0.0
@types/jsonwebtoken ^8.5.8
@types/node ^15.14.9
@types/node-fetch ^2.6.1
@typescript-eslint/eslint-plugin ^5.25.0
@typescript-eslint/parser ^5.27.0
eslint ^8.15.0
eslint-config-airbnb-base ^15.0.0
eslint-config-airbnb-typescript ^17.0.0
eslint-config-prettier ^8.5.0
eslint-import-resolver-typescript ^3.0.0
eslint-plugin-import ^2.26.0
eslint-plugin-jest ^26.4.6
eslint-plugin-jest-dom ^4.0.2
eslint-plugin-jest-formatting ^3.1.0
eslint-plugin-no-only-tests ^3.0.0
eslint-plugin-prefer-arrow ^1.2.3
eslint-plugin-prettier ^4.0.0
husky ^8.0.1
jest ^28.1.0
jsdoc ^3.6.10
nock ^13.2.4
prettier 2.6.2
rollup ^2.62.0
rollup-plugin-auto-external ^2.0.0
rollup-plugin-browsersync ^1.3.3
rollup-plugin-delete ^2.0.0
rollup-plugin-dts ^4.2.2
rollup-plugin-esbuild ^4.9.1
rollup-plugin-inject-process-env ^1.3.1
rollup-plugin-livereload ^2.0.5
rollup-plugin-terser ^7.0.2
ts-jest ^28.0.3
ts-node ^10.8.2
typescript ^4.6.4
node >= 12.0.0
When updating a user I found out by trying to update user.customAttributes with more than one attribute, we need to either:
await Promise.all([
descopeClient.management.user.updateCustomAttribute(loginId, 'param1', 'PRO'),
descopeClient.management.user.updateCustomAttribute(loginId, 'param2', 1689018774081),
descopeClient.management.user.updateCustomAttribute(loginId, 'param3', 'xxxxx'),
])
or
2. Load user attributes and then call update()
const user = await descopeClient.management.user.load('[email protected]');
const updt = await descopeClient.management.user.update(user.loginIds[0], user.email, user.phone, user.displayName, user.roleNames, user.tenants, {param1: 'PRO', param2: 1689018774081, param3: 'xxxxxx'})
but the same applies for any parameter that you wish to update but is in a different order.
Suggestion: change parameters to an object so we send just the ones we need
OR
add a skip value (e.g. if email==='_' doNotUpdateThis
).
also the updateCustomAttribute()
could be accept more than one attribute per call.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.