Testing the iFrame Authentication
    • Dark
      Light
    • PDF

    Testing the iFrame Authentication

    • Dark
      Light
    • PDF

    Article summary

    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,

    • Clone the GitHub repository for the iframe-auth-example test service. Navigate to the project directory and run these commands to start the project:

    npm install
    npm start

    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:

    Username: new-user

    Password: new-users-passw0rd

    Change the currentUsername to ' 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.

    To learn more, see this pull request.

    • 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.


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.
    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence