Skip to content

Conversation

tanya732
Copy link
Contributor

@tanya732 tanya732 commented Mar 21, 2025

Changes

Path HTTP Method Method Name
/connections POST create
/connections/{id} PATCH update
/connections/{id} GET get
/connections GET getAll
/self-service-profiles/{id}/sso-ticket POST createSsoTicket

Added idpinitiated, domain_aliases_config and domain_aliases_config in PostSsoTicketRequest and show_as_button in Connection

‼️‼️ Note ‼️‼️ -

This PR includes a breaking change -

Endpoint - path:/connections, method: 'GET',
Updated response from Array<Connection> to Array<ConnectionForList>;

References

https://oktawiki.atlassian.net/wiki/spaces/Bacca/pages/3198158797/SS-SSO+-+Endpoint+Changes+DX+Focus

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage
  • This change adds integration test coverage

Manual Testing

Securely store your Client ID, Client Secret, and Management API token.
Install the SDK: npm install auth0
var management = new ManagementClient({
domain: '{YOUR_TENANT_AND REGION}.auth0.com',
clientId: '{YOUR_CLIENT_ID}',
clientSecret: '{YOUR_CLIENT_SECRET}',
});

Get All Connections

const data = await auth0.connections.getAll()

Get Connection by ID

const getConnection = await auth0.connections.get(<Connection_ID>)

Create Connection

const createConnectionRequest = {
           name: <name>,
           display_name: < display_name>,
           strategy: <strategy>,
           show_as_button: true,
           // add other required fields
           }
           
const createConnectionResp = await auth0.connections.create(createConnectionRequest)

Update Connection

const updateConnectionRequest = {
    // add other required fields
    show_as_button: true,
    is_domain_connection: false
    }

const updateConnectionResponse = await auth0.connections.update({<Connection_ID>}, updateConnectionRequest)

Create an SSO access ticket

const ssoAccessTicketRequest = {
    connection_config: {
      name: 'name',
      display_name: 'display name',
      is_domain_connection: true,
      show_as_button: true,
      metadata: {},
      options: {
        idpinitiated: {
          enabled: true,
          client_id: '<CLIENT_ID>',
          client_protocol: '<CLIENT_PROTOCOL>',
          client_authorizequery: '<QUERY>',
        },
        icon_url: 'https://example.com/image.png',
        domain_aliases: [],
      },
    },
    enabled_clients: [],
    enabled_organizations: [
      {
        organization_id: 'ORG_ID',
        assign_membership_on_login: true,
        show_as_button: true,
      },
    ],
    ttl_sec: 0,
  };
const response = await auth0.selfServiceProfiles.createSsoTicket(<SELF_SERVICE_PROFILE_ID>}, ssoAccessTicketRequest);

Checklist

@tanya732 tanya732 requested a review from a team as a code owner March 21, 2025 16:57
kushalshit27
kushalshit27 previously approved these changes Mar 25, 2025
@tanya732 tanya732 force-pushed the sdk-5651-SS-SSO-FF-node-auth0-support branch from e6e4ee1 to e2e2565 Compare April 10, 2025 11:51
@tanya732 tanya732 merged commit 02189f6 into master Apr 15, 2025
8 checks passed
@tanya732 tanya732 deleted the sdk-5651-SS-SSO-FF-node-auth0-support branch April 15, 2025 17:55
@tanya732 tanya732 mentioned this pull request Apr 16, 2025
@cwkfs
Copy link

cwkfs commented Apr 20, 2025

Hi! Curious to know for the new interface introduced ConnectionForList, why is it that all of its properties are marked as optional with the ? question mark symbol? Even for connection's id, name properties ??

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.

4 participants