How Can We Help?
< Back
You are here:
Print

Chat Room SSO

Chat Room SSO (single-sign-on) is an option that allows users to seamlessly log into a chat room using their existing user credentials from another system.

For example, if you already have users in your database or other CMS (for example: WordPress) and you wish to allow them to automatically log in to the chat room without the need to re-enter their user name (or password), then chat room SSO integration is what you need.

This integration simplifies the user experience by removing the need for separate login credentials for the chat room. Integration takes 2 minutes and is pretty easy, see here Chat Room SSO login SDK, only authenticated users from a predefined user base can access the chat.

Steps to enable it:

1 – In your RumbleTalk admin panel, check the “User authentication required” (using your user base) – this will remove the login interface from the chat and only users authenticated by you will be able to log into the chat room.

communities

2 – Add script to your  <head> section (make sure the version is the latest)

<script>
…..code from section 3 in the Chat Room SSO login SDK page.
</script>

3 – Now you will need to add the information of your users that will be logged-in. Note, the first 2 are fields are needed, the chat unique ID (hash) and a user name.

  • YOUR_CHAT_HASH – 8 characters code, representing your chat.
  • USERNAME – The username of the user. This field should be changed based on the authenticated

    Optional:
  • PASSWORD – [optional] The predefined password.
  • IMAGE – [optional] An image URL to be used as the user avatar
  • FORCE_LOGIN – [optional] When set to true, will first log out the currently logged-in user, and then execute the login command. This only affects the user of the browser that executed the command.
  • CALLBACK_FUNCTION – [optional] a callback function that will be called (with the result as the first parameter) when the login process is done.

<script>
rtmq(
‘login’,
{
hash: ‘YOUR_CHAT_HASH’,
username: ‘USERNAME’,
password: ‘PASSWORD’, // [optional]
image: ‘IMAGE’, // [optional]
forceLogin: ‘FORCE_LOGIN’, // [optional]
callback: ‘CALLBACK_FUNCTION’ // [optional]
}
);
</script>

TIP TIP

The most common reason why the automatic login is not working, is that the “Allow guest logins” option is disabled for the chat room you are setting up. Note, this does not mean guests will be able to log in.

The implementation involves embedding specific JavaScript code on the website hosting the chat. This code handles the automatic login process by passing necessary user details, such as username and optionally an avatar, to the chat platform. The integration can also include additional features like auto-logout and private chat initiation, providing a comprehensive and customized chat experience.

For developers, further customization and control can be achieved through RESTful APIs, allowing for more complex integrations and user management.

Categories