RocketChat / EmbeddedChat

An easy to use full-stack component (ReactJS) embedding Rocket.Chat into your webapp

Home Page:https://www.npmjs.com/package/@embeddedchat/react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot login EmbeddedChat through username and password

thesynthax opened this issue · comments

Description:

I am not able to log into my server from the EmbeddedChat front-end. This happens on packages/react (storybook), packages/auth as well as using EmbeddedChat component in my React Website. The servers I tried on were the development server(6.7) and production stable server (6.6) both. I checked the host URL, went through the code, tried debugging yet no luck.
I went and did the HTTP request through "curl http://localhost:3000/api/v1/login -d 'username=blah&password=blah' " and it returned an OK response.

Steps to reproduce:

In React Webapp or Storybook (yarn storybook in packages/react):

  1. Click JOIN
  2. Type in username and password
  3. Click Login
  4. Nothing happens

In auth frontend (yarn dev in packages/auth):

  1. Type in username and password
  2. Click Login
  3. Error response appears

Expected behavior:

Logging into my server

Actual behavior:

Error response appears in case of auth frontend and nothing happens in case of react/storybook.

bug5.mp4

Hey @thesynthax , Please try following the documentation while trying to run this application. It is working properly in my system.

Here is the documentation : https://github.com/RocketChat/EmbeddedChat/blob/develop/README.md

If you still find any issue, You can discuss it in support channel or you discuss the same with me on LinkedIn : https://www.linkedin.com/in/zishanahmad72/

Do you have CORS enabled on your server ? If not please do enable it.. and even after that if it is not working, please share the console screenshot

Messaged on LinkedIn

Yep replied. have a look

Solution: Enable CORS in the Administration settings of your Rocket.Chat server