Test OTP / Google 2 Factor Authentication

You can test users that have existing 2 factor auth setups. Rainforest allows you to issue the OTP by passing Rainforest the secret for a particular user. Normally you would pass this a via step-variable.

Note: this should only be used for test-accounts and or test environments as the secret is exposed.

To get started:

  1. Add a base32 encoded secret to a step variable. We'll assume this is named {{logins.otp_secret}} for the rest of the example.

  2. Instruct the tester
    Action:
    Open https://otp.rainforestqa.com/code/{{logins.otp_secret}} in a new tab.
    Copy the code shown when there is more than 15 seconds left.
    Paste it into the box on the previous tab.

    Question:
    Was the code accepted to allow you to log in?

For an example of what this looks like for a tester, see this example.

Did this answer your question?