How to use Claude to verify MFA with Playwright
A Claude SDK agent used Playwright and a small Python TOTP implementation to configure MFA and verify an authentication change in a preview instance.
Suggested prompt
Suggested prompt written by Agents In Use, not the source author. Replace bracketed inputs and review tool permissions first.
For [pull request] in [preview environment], inspect the code and create a UAT plan. Use Playwright to enable MFA and create a test user. Build a small Python TOTP device for the test, verify the changed MFA behavior, and capture screenshots and results for review.
Reach people exploring AI agents
See placements →Evidence at a glance
Sourced account- Source author
- beaugunderson
- Original account
- Read the source ↗
- Published
- Source link checked
- Reported result
- The author says the agent verified that MFA still worked as expected, probed more functionality than planned, and incurred a token price of $5.69.
- Human involvement
- The author reports the successful run but does not describe independent human review of its test results.
A linked account supports attribution. It does not mean we independently reproduced its result.
Report an issue with this case
Open correction emailOpens your email app with the case link included. Nothing is sent automatically.
How the agent did it
- Create a test plan using knowledge of the application code.
- Enable MFA by changing the preview instance configuration.
- Create a user with MFA enabled in the instance.
The author built a user acceptance testing agent on top of claude-agent-sdk. It uses Playwright and can start preview instances for pull requests. The agent draws on its knowledge of the code to create a test plan, runs that plan, and takes screenshots during execution.
A recent pull request changed the application's multifactor authentication implementation. The author expected to test it manually because MFA requires setup and a TOTP device. Instead, the agent used Playwright to change the instance configuration and enable MFA. It then created a user with MFA enabled and wrote a small Python TOTP implementation to serve as the authentication device.
The author says the agent successfully verified that MFA still worked as expected. They also described its functionality probing as more exhaustive than the substantial testing they had planned for this sensitive change. The reported token price for the run was $5.69. The excerpt does not detail an independent human review of the agent's test results.
Who it's for: Teams with preview environments that want browser-driven acceptance testing for authentication changes involving setup and one-time codes.
Prompt
Suggested prompt (written by Agents In Use, not the author's)
Source: Hacker News · beaugunderson
Frequently asked questions
How did the agent supply a TOTP device?
It wrote a small Python TOTP implementation and used that as the device during verification.
What did the author report about cost?
The author reported a total token price of $5.69 for the UAT run.
More details
Remaining steps
- Write a small Python TOTP device and verify MFA behavior.
About this account
The UAT agent generated and executed a test plan, configured MFA, and built a TOTP device without the expected manual setup.
Platform: Hacker News. Attribution: https://news.ycombinator.com/item?id=48758367. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.
Credit: beaugunderson on Hacker News
Source published
Added to Agents In Use
Source checked
Tools and topics
claude-agent-sdk · Playwright · Python TOTP
Agent workflows
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.