Versions Compared

Key

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

The login directive enables the admin users to add a login button to your chatbot flow. The button click redirects the user to the Orbita’s user login page in a new tab. If the user successfully logs in, the login tab closes automatically.

...

We will create a flow studio flow and add a custom Custom control followed by a single Single input node at the beginning of the flow (as shown below) to prompt the user to login.

...

Code Block
msg.orbita.session.isLogin = true;
return msg;

Render Login Directive in the chat bubble

You can make use of the HTML directive and load the Login page within the Chat bubble.

...

You should know the URL of the login page for your instance.

The easiest way to get the URL is to use the login directive and copy the URL of the login tab (this will be opened in a new tab) when you click the login button.

Sample code

Code Block
msg.payload.orbita.directive = [{
    type: "html5",
    options: {
        template: '500x600',
        url :"https://environment.orbita.cloud:8443/oauth/login?response_type=code&redirect_uri=https://environment.orbita.cloud:8443/oeapi/bot/support&scope=personaldata&client_id=*****"
    }
}]
Attachments
previewfalse
uploadfalse
oldfalse
patterns.*json

...