Handling external events

Hi everyone,

So for authentication, our team decided to do it externally where

  1. User would be given a link/button that would redirect him to our login/signup page.
  2. Upon successful login, a callback would be generated from the login/signup page to the Rasa Open Source server letting it know that user has successfully logged in.

Now, referring to the docs Reaching-out-to-user, we’re using an api similar to

https://{domain}/conversations/{sender_id}/trigger_intent?output_channel={channel name}

This would trigger an intent along with some entities sent as POST data, and then it would call a custom action. Now the action does 2 things

  1. Set the user_auth slot to true
  2. Send a message back to user that he has successfully signed in.

-----Problem-----

The intent gets triggered, the action gets called - we’ve verified it using Telegram, Slack and MS Teams.

However, the utter_message inside the custom actions thats supposed to let the user know that they successfully signed in, doesn’t get sent to MS Teams. But it works when using Slack or Telegram.

One more thing I’d like to add here is that, the utter_message in the case of MS Teams gets sent back as the reponse when calling the callback url.

Could someone please help us out a little or nudge us in the right direction? Thanks!!

I would do all of the authentication work outside of Rasa. Between your front end and back end like any other app using the language and backend you’ve chosen. After successful login, the front end would get a JWT (token). That token can be passed to Rasa and stored in a slot (on action_session_start) which can be used when the bot user needs to take an action that requires authentication.

Don’t use external events for any of this.