Switch dashboard auth to NextAuth and ask for tests
A developer used Cursor to move a dashboard off custom auth, while a background agent built tests in a separate branch.
- What they did
- They told Cursor’s Agent chat to replace the existing sign-in system with NextAuth.js. The agent touched 14 files across routing, middleware, session logic, page wrappers, and environment settings. Separately, a background agent worked on another branch, added test coverage for a Python data pipeline, and opened a pull request while the dashboard migration was still underway.
- How it went
- The auth change was completed in about 90 minutes, compared with a 4-hour estimate, but three manual corrections were still needed: a missing environment variable, a callback URL mismatch, and a session type problem. The testing branch produced 34 tests, with 28 passing at first and 6 needing fixture updates.
- Tips
- For this kind of migration, make the agent show its plan before it edits anything, then review auth and environment changes yourself. If you lean on agents often, watch your credit balance; this author used up Pro credits around day 22 and paid for extra credits twice.
Try it yourself with Cursor
I’m working on [project name]. Replace [current auth approach] with [target library] throughout the parts that depend on it: routes, middleware, session code, page wrappers, and environment config. Also, on a separate branch, have a background agent create and run tests for [related component or pipeline]. Before changing files, show me the plan and wait for approval. Afterward, report what was modified, which tests passed or failed, and anything I should check by hand before I merge, deploy, submit, send, or delete anything.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Use Cursor to spot prototype gaps and draft a build plan
A founder used Cursor to inspect a trip-planning app, surface missing pieces, sketch screens, and then build a feature with parallel agents.
Use Cursor to inspect pod logs and fix compose files
A DevOps engineer used Cursor to read production pod logs through Kubernetes MCP and to repair a broken Docker Compose setup.
Let a background agent watch tasks and open PRs
A team keeps a server-based agent running so Cursor can monitor work and turn finished tasks into pull requests.
Use a background agent to turn an issue into a PR
A developer sent Cursor at a Terraform repo issue and got a pull request back quickly, but the PR text still needed manual cleanup.
Build Ansible with Cursor and keep lessons in CLAUDE.md
They used Cursor and Claude to write most Ansible code, while saving lessons and plans to files so the work could continue after compaction.
Run Cursor on small, well-scoped tasks
One commenter uses Cursor agent mode for limited feature work, with a human checking the plan and the agent saving notes for later runs.