Versions Compared

Key

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

...

Code Block
if(!msg.payload.orbita) {
    msg.payload.orbita = {};
}

if(!msg.payload.orbita.directive) {
    msg.payload.orbita.directive = [];
}

msg.payload.orbita.directive.push({
    type: 'login', 
    successUtterance: 'success', 
    html: `<button class="smrtBtn chattheme chatthemeborderbuttons">Login</button>`
})
// msg.payload.logoutUrls = [{
//     'type': 'window', 
//     url:'http://localhost:3030/oauth/logout?'
// }]; 
msg.payload.orbita.state = "Login"

return msg;

...

How to get inline login

You can make use of the HTML directive to get inline login in the Chatbot. See, HTML Directive

...

You can use successUtterance: 'success' or loginSuccessUtterance: 'success', to invoke the Intent after the HTML content (Login page) is rendered.

The Login Directive and the Inline Login are combined in a single flow in the below attachment.

Attachments
previewfalse
oldfalse
patterns*.json

...