Skip to content

Configure a custom connector

You can add login to your applications using a custom connector in WSO2 Identity Server and enable users to log in with the configured connector. This custom connector can be any identity provider such as Facebook, Twitter, Google, Yahoo or a custom federared authenticator.

Follow this guide for instructions.

Register the custom connector

  1. On the WSO2 Identity Server Console, go to Connections.
  2. Click Create Connection and select Custom Connector.
  3. Enter a unique name and a description and click Finish.
  4. Go to Settings tab and click New Authenticator.
  5. Select the authenticator you want to add and click Next.

    Note

    You can configure predefined authenticators as well as the custom federated authenticators. See Write a custom federated authenticator for more information.

  6. Enter the requested details depending on the selected authenticator and click Finish.

Tip

You can add multiple authenticators to the custom connetor and select one authenticator as the default.

Enable login using the custom connector

Before you begin

You need to register an application with WSO2 Identity Server. You can register your own application or use one of the sample applications provided.

  1. On the WSO2 Identity Server console, go to Applications.

  2. Select your application, go to the Login Flow tab and add the custom connector from your preferred editor:

    1. Click Add Sign In Option to add a new authenticator to the first step.

    2. Select the custom connection.

    3. Click Confirm to add login with the custom connection to the sign-in flow.

      Configuring login with a custom connector in WSO2 Identity Server using the Visual Editor

    Recommendations

    It is recommended to add your social and enterprise connections to the first authentication step as they are used for identifying the user.

  3. Click Update to save your changes.

Try it out

  1. Access the application URL.

  2. Click Login to open the WSO2 Identity Server login page.

  3. On the WSO2 Identity Server login page, select the sign in option configured.

    Login with custom connector

  4. Log in using an existing account in the authenticator selected (e.g. Google, Facebook, custom federated authenticator etc.)

  5. The user is now redirected to the application and logged in.

Map groups with WSO2 Identity Server

Configure External Connection's Group attribute

To add groups to a connection on WSO2 Identity Server:

  1. On the WSO2 Identity Server Console, go to Connections.

  2. Select your connection and go to its Attributes tab.

  3. Click Add Attribute Mapping to add a new attribute mapping.

    Add attribute mappings

  4. Enter the External IdP Attribute of the connection and map it to the Groups attribute of Asgardeo.

    Add new group attribute mapping

  5. Click Add Attribute Mapping and then click Save.

    Stage new group attribute mapping

  6. Click Update to save the changes.

    Submit attribute mappings

Add groups to connections

Follow the steps below to add the groups from your connection to Asgardeo:

  1. On the Asgardeo Console, go to Connections.
  2. Select your connection and go to its Groups tab.
  3. Click New Group and enter the group name. Be sure to enter the exact group name that will be returned from the connection.

    Add group

  4. Click Finish to add the group information.

Delete a connection

Before you begin

If your connection has applications associated with it, you will not be able to delete the connection.

Before deleting such connections:

  1. Check the associated applications from the Connected Apps tab of the connection.
  2. Click on an application that uses the connection and you will be redirected to the Login Flow tab of the respective application.
  3. Remove the connection from the sign-in flow of the associated applications.
  4. Repeat steps 2 and 3 for all listed applications.
  5. Proceed to delete the connection.

To delete a connection:

  1. On the WSO2 Identity Server Console, go to Connections.
  2. Click Set up and navigate to the General tab.
  3. At the bottom of the page, click the button in the Delete connection.

    Note

    You cannot delete connections that are available by default.

  4. Select the checkbox and confirm your action.

    Delete connection