Github OAuth for example will issue a 2FA email-based challenge non-deterministically. We handle that by detecting the challenge and filling out the challenge code based on the contents of the email sent by Github. This requires a one-time setup where you add an email address we control to your Github user so that we can read and parse it.
For Google OAuth we can execute all the steps but the two issues there are (1) we run everything in a single window and some web apps don't like that because they assume the oauth flow will happen in a new window, and (2) sometimes Google prompts you to answer a security question and we don't yet support marking test steps as optional.
What our customers have been doing instead is setting up a mechanism to auto-log in the test user using a magic link. Basically sending in a one-time-use auth code to a URL in their app that then authenticate the user. I think some platforms (Firebase?) have built-in support for this.
I'm certainly happy to brainstorm what could work best for you though if you'd like (my email: todd at reflect.run)
In terms of added security, some options there would be to only enable these "magic links" in staging and only enable this type of auth for a least-privledged user account (e.g. no admin or employee accounts could auth this way).
More just seeking bounds of possibilities, thanks for your replies.
Curious how your service would handle a app that mandates non-email based MFA like SMS or TOTP.
Additionally, what about testing a onboarding flow that might require some form of manual approval?
Thanks!
No support for TOTP unfortunately, but if the SMS or email-based challenge support would work for you feel free to reach out and I can talk to the specifics of the one-time setup - todd at reflect dot run
I warmly recommend _not_ testing Google OAuth and instead passing a token and bypassing it on your server's side.
The way automation can work around it (in Testim.io for example) is "mock network" which is supported in our codeless solution but also available in most test infrastructure (like Playwright which is FOSS). You would mock out the parts that leave the user with a token they can use to authenticate.