...
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
Login to Amazon Cognito.
Click on the
Give a user pool name.
Click on Review default settings
Accept the terms and click on the Create pool button.
General Settings
App client
Select the User pool
Navigate to the side menu > General Settings >App clients.
Click on the Add an app client button
Give a name for the app client.
Configure the rest of the settings as you require (for this example, we use the default settings)
Click on Create app client.
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
Navigate to the side menu > App integration > App client settings.
Click on the Cognito User pool check box.
Fill in the Callback URL with the chatbot endpoint.
Use the https://<domain-name>.orbita.cloud:8443/oeapi/logout for the signout URL.
Enable Authorization code grant and Implicit grant
Under the Allowed OAuth scopes, check everything except the aws.cognito.signin.user.admin.
Click save changes.
Domain name
Navigate to the side menu > App integration > Domain name.
Enter a domain prefix and click on the Check Availability button.
Click on Save changes
Orbita Experience Designer
Global menu > providers.
Add a provider
Give a provider name without spaces.
In the Authorization URL field, enter the <Custom-Domain-URL>/oauth2/authorize
In the Token URL field, enter the <Custom-Domain-URL>/oauth2/token
Enter the Client ID that is generated while adding the app client in Cognito.
Enter the Client Secret that is generated while adding the app client in Cognito.
The callback URL is our URL for Orbita.
https://<domain-name>.orbita.cloud:8443/api/auth/<provider-name>/callbackAs we have enabled multiple scopes in the app client settings, you can provide any of those scopes here.
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.
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.Save the Provider.
Navigate to the project listing screen.
Click on the verticle ellipses against the project and click on Edit.
Select the OAuth provider as Cognito.
Testing the integration
Load the chatbot
Click on the login button when prompted to log in. See How to use Login Directive
When you click the Login button, you will be navigated to the Cognito authentication page.
Login with an existing account or create a new one.
The user pool is set to require further authentication to log in.
After successful authentication, you are now logged into the chatbot.