# JWT Authentication with webchat UI for socketio channel

**URL:** <https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503>\
**Category:** Rasa Open Source\
**Created:** [July 8, 2021, 5:20am UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503 "2021-07-08T05:20:26Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![bharath-madduri](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/bharath-madduri/32/18010_2.png) [@bharath-madduri](https://forum.rasa.com/u/bharath-madduri)\
**Post date:** [July 8, 2021, 5:20am UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/1 "2021-07-08T05:20:26Z")

</div>

I am trying to implement JWT authentication for [rasa-webchat](https://github.com/botfront/rasa-webchat) UI on SocketIO Channel. In latest version of rasa 2.6 and 2.7 documentation they mentioned the commands to run and changes to make in Credentials.yml  
[screenshot1 documentation](https://rasa.com/docs/rasa/connectors/your-own-website#jwt-authentication)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/b/b820fc0e49af6cff41646b17a5258c52dd6c25b4.png)[screenshot2 doc](https://rasa.com/docs/rasa/http-api#jwt-based-auth)  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/c/c0737a000643e18835ed6ac313011df924446b8a.png)  
I am able to make the changes as mentioned, but not able to understand how to pass token from webchat UI and how to cross-check at rasa end.

A demo on how JWT Authentication can be implemented on [webchat](https://github.com/botfront/rasa-webchat) for socketio channel will be much helpful.

---

<div class="post-metadata">

**Author:** ![koaning](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/koaning/32/6626_2.png) [@koaning](https://forum.rasa.com/u/koaning)\
**Post date:** [July 9, 2021, 9:55am UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/2 "2021-07-09T09:55:13Z")

</div>

Just to clarify, when you refer to “webchat” are you referring to your own html widget? Could you also link to the portion of the documentation that you used for your screenshot?

---

<div class="post-metadata">

**Author:** ![koaning](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/koaning/32/6626_2.png) [@koaning](https://forum.rasa.com/u/koaning)\
**Post date:** [July 12, 2021, 12:15pm UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/6 "2021-07-12T12:15:20Z")

</div>

Clear!

One thing to point out first. The botfront project is not officially supported by Rasa and it’ll likely not get much support since the original creators of the tool have [acquired](https://botfront.io/blog/botfront-acquisition-botfront-1-0-and-the-community). The readme of the project also suggest they only support version 2.3.x and 2.4.x of Rasa.

---

<div class="post-metadata">

**Author:** ![koaning](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/koaning/32/6626_2.png) [@koaning](https://forum.rasa.com/u/koaning)\
**Post date:** [July 12, 2021, 12:16pm UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/7 "2021-07-12T12:16:29Z")

</div>

Reading the docs though, it’s suggest that you merely need to send the [encoded jwt](https://rasa.com/docs/rasa/connectors/your-own-website#jwt-authentication) as part of whatever payload you send to the server. That doesn’t work?

```auto
{
  ...
  "token": "jwt_encoded_payload"
}

```

---

<div class="post-metadata">

**Author:** ![bharath-madduri](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/bharath-madduri/32/18010_2.png) [@bharath-madduri](https://forum.rasa.com/u/bharath-madduri)\
**Post date:** [July 12, 2021, 12:17pm UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/8 "2021-07-12T12:17:49Z")

</div>

I’m just stuck on how to pass the payload from client to server either from botfront webchat UI or custom widget, very new to the rasa.

---

<div class="post-metadata">

**Author:** ![koaning](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/koaning/32/6626_2.png) [@koaning](https://forum.rasa.com/u/koaning)\
**Post date:** [July 12, 2021, 12:21pm UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/9 "2021-07-12T12:21:48Z")

</div>

I’ve never worked with botfront before so I can’t help you on that either.

Just to check, are you building a demo? If so, Rasa X might be an easy fix for now to allow internal users communicate with your assistant.

---

<div class="post-metadata">

**Author:** ![bharath-madduri](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/bharath-madduri/32/18010_2.png) [@bharath-madduri](https://forum.rasa.com/u/bharath-madduri)\
**Post date:** [July 12, 2021, 12:23pm UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/10 "2021-07-12T12:23:05Z")

</div>

I have used botfront UI for 2.5 version, but rasa started providing jwt for socketio from 2.6 as per docx, and looking for long term rather for time being to test with rasa x.

---

<div class="post-metadata">

**Author:** ![webdev-rohit](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/webdev-rohit/32/18943_2.png) [@webdev-rohit](https://forum.rasa.com/u/webdev-rohit)\
**Post date:** [February 4, 2022, 11:47am UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/11 "2022-02-04T11:47:08Z")

</div>

Hello @bharath-madduri I’m stuck at this too, can you tell me if you did solve it? The docs say that the jwt token can be passed in a json format. But exactly where and how it should be embedded in the client side is something I’m still not clear.

---

<div class="post-metadata">

**Author:** ![webdev-rohit](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/webdev-rohit/32/18943_2.png) [@webdev-rohit](https://forum.rasa.com/u/webdev-rohit)\
**Post date:** [February 4, 2022, 11:47am UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/12 "2022-02-04T11:47:42Z")

</div>

@nik202 Sir, can you please help out with this!

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [February 4, 2022, 2:26pm UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/13 "2022-02-04T14:26:55Z")

</div>

@webdev-rohit can you please create a new thread of your issue, and share it with some screenshots or traceback, Or if you already have a thread tag me please. Thanks.

---

<div class="post-metadata">

**Author:** ![webdev-rohit](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/webdev-rohit/32/18943_2.png) [@webdev-rohit](https://forum.rasa.com/u/webdev-rohit)\
**Post date:** [February 4, 2022, 2:28pm UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/14 "2022-02-04T14:28:57Z")

</div>

I do have a topic created. I’ll tag you there @nik202

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [February 4, 2022, 2:29pm UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/15 "2022-02-04T14:29:49Z")

</div>

@webdev-rohit perfect!

---

<div class="post-metadata">

**Author:** ![bharath-madduri](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/bharath-madduri/32/18010_2.png) [@bharath-madduri](https://forum.rasa.com/u/bharath-madduri)\
**Post date:** [February 5, 2022, 5:33am UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/16 "2022-02-05T05:33:40Z")

</div>

@webdev-rohit no luck with the JWT Authentication using rasa-webchat. If you are able to find a solution, please provide here.

---

<div class="post-metadata">

**Author:** ![meghna43](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/meghna43/32/22716_2.png) [@meghna43](https://forum.rasa.com/u/meghna43)\
**Post date:** [February 9, 2024, 3:55am UTC](https://forum.rasa.com/t/jwt-authentication-with-webchat-ui-for-socketio-channel/45503/17 "2024-02-09T03:55:46Z")

</div>

did anyone get this working? if someone could share what payload to send from webchat and if there needs any modification on credentials.yml
