Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can also configure third-party Oauth providers such as Social media sites including Facebook, Twitter, Microsoft, Amazon, and more.

Oauth is an authorization framework specifically built for HTTP APIs that let the users grant access to an application to use their user data.

In Summary, Orbita supports account linking to any third-party system that supports the Auth Code Grant Flow of OAuth 2.0.

In this example, we will use Amazon Cognito. Amazon Cognito service is designed to provide APIs and infrastructure for key features in the user management space such as authentication, authorization, and managing user repositories with different operations for your web and mobile apps. Refer https://docs.aws.amazon.com/cognito/latest/developerguide/what-is-amazon-cognito.html for more information.

This web service lets you add user sign-up, sign-in, and access control to Orbita.

Amazon Cognito

Create a user pool

  1. Login to Amazon Cognito.

  2. Click on the

  3. Give a user pool name.

  4. Click on Review default settings

  5. Accept the terms and click on the Create pool button.

General Settings

App client

  1. Select the User pool

  2. Navigate to the side menu > General Settings >App clients.

  3. Click on the Add an app client button

  4. Give a name for the app client.

  5. Configure the rest of the settings as you require (for this example, we use the default settings)

  6. Click on Create app client.

  7. Note the Client ID. (Client ID is a publicly exposed string that is used by the service API to identify the application and is also used to build the authorization URLs that are presented to the users.

App Integration

App client settings

  1. Navigate to the side menu > App integration > App client settings.

  2. Click on the Cognito User pool check box.

  3. Fill in the Callback URL with the chatbot endpoint.

  4. Use the https://<domain-name>.orbita.cloud:8443/oeapi/logout for the signout URL.

  5. Enable Authorization code grant and Implicit grant

  6. Under the Allowed OAuth scopes, check everything except the aws.cognito.signin.user.admin.

  7. Click save changes.

Domain name

  1. Navigate to the side menu > App integration > Domain name.

  2. Enter a domain prefix and click on the Check Availability button.

  3. Click on Save changes

Orbita Experience Designer

  1. Global menu > providers.

  2. Add a provider

  3. Give a provider name without spaces.

  4. In the Authorization URL field, enter the <Custom-Domain-URL>/oauth2/authorize

  5. In the Token URL field, enter the <Custom-Domain-URL>/oauth2/token

  6. Enter the Client ID that is generated while adding the app client in Cognito.

  7. Enter the Client Secret that is generated while adding the app client in Cognito.

  8. The callback URL is our URL for Orbita.
    https://<domain-name>.orbita.cloud:8443/api/auth/<provider-name>/callback

  9. As we have enabled multiple scopes in the app client settings, you can provide any of those scopes here.

  10. When an account is linked, a placeholder user is created in Orbita. The user is created using the persona type specified in the drop-down menu. Select any one of these.

  11. Profile options will fetch and store the information of the logged-in user from the client’s database.
    A Json code that contains the URL, header, method, body, and attributes is to be used in this field to get the data.

  12. Save the Provider.

  13. Navigate to the project listing screen.

  14. Click on the verticle ellipses against the project and click on Edit.

  15. Select the OAuth provider as Cognito.

Testing the integration

  1. Load the chatbot

  2. Click on the login button when prompted to log in. See How to use Login Directive

  3. When you click the Login button, you will be navigated to the Cognito authentication page.

  4. Login with an existing account or create a new one.

  5. The user pool is set to require further authentication to log in.

  6. After successful authentication, you are now logged into the chatbot.