Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Array of Strings in Custom Attributes in Types #444

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Khalil-codes
Copy link

Related Issues

Fixes #443

PR Description: Add Support for Array of Strings in Custom Attributes

Overview

This PR updates the Node SDK to support arrays of strings for custom attributes when creating or updating tenants and users. Previously, the SDK did not allow arrays, despite the Descope UI supporting multi-select attributes, which function as an array of strings.

Changes Introduced

  • Updated the custom attribute type definition to include string[] in the union.
  • Ensured that multi-select attributes can be assigned as an array of strings when using the SDK.
  • Added validation to handle array-based attributes correctly.
  • Updated relevant documentation and type definitions.

Fixes

  • Resolves the issue where multi-select attributes could not be set via the SDK.

Testing

  • Successfully created and updated tenants and users with multi-select attributes using an array of strings.
  • Verified that existing functionality remains unaffected.
  • Added unit tests to ensure proper handling of array attributes.

Next Steps

  • Review if additional SDKs require a similar update for consistency.
  • Update documentation if needed to reflect this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant