This article will describe how to test the iFrame authentication, using a test tool developed by Rocket.Chat team. This test scenario is based in a localhost environment.
Download and start the iframe-auth-example test service following the steps mentioned here
The test service code can be used as an example on how to setup the iFrame auth calls to Rocket.Chat. Code is available here.
Configure Rocket.Chat server (Administration > Accounts > iFrame) as follows:
Test the iFrame service by calling Rocket.Chat login URL (in this example, http://localhost:3000\)
In this moment, the iframe-auth-example service runs and the iframe authentication calls are executed.
By default, the test service code expects the login to be done with the following credentials (harcoded)
username: new-user
password: new-users-passw0rd
Change the currentUsername (line 105) to true so you can login again with the same user. By changing the code you may use any user which already exists in Rocket.Chat
Further reference can be found here.

