RocketChat / EmbeddedChat

An easy to use full-stack component (ReactJS) embedding Rocket.Chat into your webapp
https://rocketchat.github.io/EmbeddedChat/docs
126 stars 252 forks source link

Auth & Commands from iframe embedding? #30

Closed dmonn closed 2 years ago

dmonn commented 2 years ago

Excited to see this! We've embedded RocketChat in our own product using the iframe integration. Guess we could give the component a go if commands from the iframe integration are supported? Especially login-with-token and go

https://developer.rocket.chat/rocket.chat/iframe-integration/iframe-integration-sending-commands

sidmohanty11 commented 2 years ago

@dmonn hey, thanks a lot for checking out the product even before it's launched.

We are actually taking "the component route" while designing the EmbeddedChat. EmbeddedChat is an independent entity that will handle auth for you so you don't need to pass in or worry about anything. For now, we are planning to develop it for a Reactjs web application so that by doing,

<RCComponent
  isClosable={true}
  setClosableState={setClosableState}
  moreOpts={true}
  width="100%"
  height="40vh"
  GOOGLE_CLIENT_ID={process.env.REACT_APP_GOOGLE_CLIENT_ID}
  host={'https://your-rc-instance-host-url.com'}
  roomId={'GENERAL'}
  channelName="General"
  anonymousMode={false}
  isFullScreenFromStart={false}
/>

will popup the component.

For other frameworks, we suggest that you take "the iframe route" where you create a basic react app and embed the component and then host it, then you can take the URL and give it to the iframe.

Why EmbeddedChat?

An example can be seen here with tech.co site, tech co

Please feel free to add your thoughts on what you would like us to do or some features that you want to see.

Again, Thanks a lot!

dmonn commented 2 years ago

Any other auth options beyond Google SSO would be class! E.g. how would we integrate this for a user chat? Right now we do this via login tokens.

Also, love the auth magic ;) Our auth with iframe generally takes about 2-3 seconds to load. Is this going to be different?

sidmohanty11 commented 2 years ago

@dmonn sorry for the late reply, was caught up with exams. We will be introducing other Auth options beyond Google SSO after the launch. It was our go-to because most internet users are on Gmail.

We will make a demo video on how to set it up and also different ways to go about it.

It will be super different from the iFrame one, it is very lightweight and super fast (it will feel as if a part of your app).