Testing the iFrame Authentication
After you've successfully completed Configuring iFrame auth , it's essential to confirm its functionality by testing. This guide offers a concise outline for testing iFrame authentication within Rocket.Chat. The process entails utilizing a test tool created by the Rocket.Chat team. The test service can be used as an example of how to set up the iFrame auth calls to Rocket.Chat.
This test tool is designed for your localhost enviroment.
To test your iFrame auth configuration,
The project is running on port 3030.
- On your Rocket.Chat workspace, navigate to Administration > Workspace > Settings > Accounts > Iframe. Toggle on Enabled. Add the iFrame URL and API URL.
- Navigate to the login page of the test project, which is accessible at localhost:3030/login for this example. Proceed to test the iFrame auth by submitting a username and password.
The test project requires the following hardcoded credentials for login:
currentUsernameto 'true' at line 105 in the index.js to enable re-login with the same user. Note that modifying the code allows any existing Rocket.Chat user to be used.
- Once the iframe-auth-example service runs, the iframe authentication calls are executed. It returns unauthorized if the credentials are not valid.
By adhering to the outlined steps and leveraging the provided test tool, you can confirm the successful integration of iframe authentication into your Rocket.Chat setup.
Last modified 3mo ago