Git Product home page Git Product logo

node-sdk's People

Contributors

asafshen avatar aviadl avatar bars92 avatar chris4490 avatar dependabot[bot] avatar descope[bot] avatar dorsha avatar gaokevin1 avatar guyp-descope avatar itaihanski avatar mattolson avatar meirwah avatar nirgur avatar nitzperetz avatar nmacianx avatar ofekavergil avatar omercnet avatar renovate[bot] avatar roopakv avatar ruvenzx avatar shilgapira avatar slavikm avatar talaharoni avatar tomski747 avatar yaelt47 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-sdk's Issues

Action Required: Fix Renovate Configuration

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)

Bug on Cloudflare Pages/Workers

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.

Dependency Dashboard

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 Available

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Pending Status Checks

These updates await pending status checks. To force their creation now, click the checkbox below.

  • chore(deps): update github/codeql-action action to v3

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.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
npm
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

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

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)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Update dependency jose to v4.9.0

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.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
npm
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

  • Check this box to trigger a request for Renovate to run again on this repository

Updating User

When updating a user I found out by trying to update user.customAttributes with more than one attribute, we need to either:

  1. Make n+ sdk calls:
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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.