Skip to content

Conversation

max-stytch
Copy link
Contributor

@max-stytch max-stytch commented Feb 15, 2023

  • Scaffolds out the Node Stytch B2B SDK
  • Implements the following B2B modules:
    • Members
    • Organizations
    • SSO
    • SAML
    • Member Sessions
    • Magic Links
  • Refactors the B2B and B2C SDKs to use a shared base client

anmaini-ucsd

This comment was marked as duplicate.

@stytchauth stytchauth deleted a comment from anmaini-ucsd Feb 15, 2023
Copy link
Contributor

@anmol-stytch anmol-stytch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit in LoginOrSignupByEmailResponse but other than that it looks good to me

export interface LoginOrSignupByEmailResponse extends BaseResponse {
member_id: string;
member: Member;
member_creared: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: member_created

@max-stytch max-stytch temporarily deployed to integration_tests February 15, 2023 15:05 — with GitHub Actions Inactive
Copy link
Contributor

@taronish-stytch taronish-stytch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

super(config);

if (!this.fetchConfig.baseURL.endsWith("b2b/")) {
this.fetchConfig.baseURL += "b2b/";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this because we share a baseURL with b2c? Prefer just having two completely separate variables in that case like baseB2BURL to avoid having to do something like this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our base URL is our env string - stytch.envs.live or stytch.envs.test - I didn't want to introduce a separate set of envs for B2B, I think that would make things more confusing for end users / harder to document. One other option would be to embed the b2b/ URL in all the b2b-scoped client endpoints

connection_id: string;
idp_entity_id?: string;
display_name?: string;
attribute_mapping?: Record<string, string>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to these changes - should we be adding validation in api that the value types in attribute_mapping are strings? We reuse the same entitymetadata that allows numeric values for trusted and untrusted metadata on other entities

@max-stytch max-stytch temporarily deployed to integration_tests February 15, 2023 17:34 — with GitHub Actions Inactive
@max-stytch max-stytch merged commit 1513272 into main Feb 15, 2023
@max-stytch max-stytch deleted the max/b2b-types-shared branch February 15, 2023 17:36
Copy link
Contributor

@danny-stytch danny-stytch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT

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

Successfully merging this pull request may close these issues.

5 participants