The login page looks right. There is a sign up form, a "forgot password" link, a dashboard that only appears once you are in, and it all works when you test it. So the authentication must be sorted.
Not necessarily. A login screen is the part of authentication you can see. The part that matters is what the server does when someone skips the screen entirely, and AI coding tools are much better at building the first than the second.
Below are eight bugs we see in apps built with Lovable, Cursor, Bolt, Replit and Claude Code, ordered roughly by how much damage they do. Each one has a test you can run yourself.
The server never checks who is asking
This is the big one, so it goes first. The app hides the admin button from normal users, and the dashboard page redirects you to login if you are not signed in. Everything looks locked down.
But the redirect happens in the browser. The data behind the page comes from an API endpoint, and if that endpoint does not check who is calling it, the redirect is decoration. Anyone can call the endpoint directly.
Test it: log in, open your browser's developer tools, go to the Network tab and click around until you see a request that returns your data. Right click it, copy it as a cURL command, then remove the Authorization header and the cookies and run it in a terminal. If you still get data back, the endpoint is open.
One user can read another user's records by changing an ID
You visit /orders/1042 and see your order. You change it to /orders/1043. If you can see someone else's order, that is an insecure direct object reference, and it is probably the most common serious bug in AI-built apps.
It happens because the code asks "is this person logged in?" and stops there. It never asks "does this record belong to this person?" Those are separate questions, and generated code regularly answers only the first.
Test it: make two accounts, create a record in each, and try to open one account's record while logged into the other. Try this with edit and delete actions as well as viewing, because they are often protected differently.
The app trusts a user ID sent from the browser
Related, and nastier. A form submits {"userId": "abc123", "name": "New name"} and the server updates whichever user that ID points to. The ID should come from the verified session on the server. When it comes from the request body, a logged-in user can swap in someone else's ID and edit their account.
The same thing happens with role, isAdmin and plan fields. If the browser can send them, a curious user can send a different value.
Test it: in the Network tab, find a request that saves something, and look at what it sends. Anything that identifies who the user is, or what they are allowed to do, should not be in there at all. If it is, try editing it and resending.
Admin checks that only live in the front end
AI tools often add an isAdmin flag and then use it to show or hide interface elements. The admin page is "protected" because normal users never see the link.
Guessing /admin is not hard, and the actions behind the page, like deleting users or exporting data, are just more endpoints. If they do not check the caller's role on the server, hiding the link protected nothing. (If your app uses Supabase, we covered a close cousin of this in our post on RLS mistakes, where a role stored somewhere the user can edit lets people promote themselves.)
Test it: as a normal user, visit your admin URLs directly, then try the admin actions by replaying a request you captured while logged in as admin.
Password reset links that never expire
Request a password reset and open the link. Now use it again. Then leave an old reset email for a week and try that one. A reset link should work once, and for a short time only.
Hand-rolled reset flows, which AI tools will write if you do not use a managed auth service, sometimes store a token that is valid forever or can be reused. An old email sitting in someone's inbox then becomes a standing way into the account.
Test it: use a reset link twice. Request two resets in a row and see whether the first link still works after you use the second.
Anyone can sign up as anyone
Check whether email confirmation is actually required. If someone can sign up with an email address they do not own, they can register [email protected] and sit on it. Depending on how your app matches accounts to organisations or invites, that can cause real confusion.
Also check what the signup form does when an email is already taken. A message saying "this email is already registered" tells an attacker which addresses are your customers. Some products accept that trade-off for usability, but it should be a decision rather than something the AI did by accident.
Test it: sign up with an address you have not verified and see how far you get. Try signing up with an address that already has an account and read the message you receive.
No limit on login attempts
Nothing stops a script from trying ten thousand passwords against one account, or one common password against ten thousand accounts. Managed auth providers usually apply some rate limiting by default. A login endpoint the AI wrote from scratch usually has none.
Test it: try a wrong password twenty times in a row, quickly. If nothing changes at all, no delay, no lockout, no CAPTCHA, ask whoever built the app what is limiting the rate. If the answer is "nothing", add it before launch.
Sessions that outlive their welcome
Log in on one browser, change your password in another, then go back to the first. Are you still logged in? Click log out, then press the back button, or copy a request from before you logged out and replay it. Does it still work?
Part of this depends on how sessions are stored. Many apps keep a signed token in the browser, and a token like that stays valid until it expires unless the server keeps a list of revoked ones. A short expiry is the usual defence. The bug is when the AI sets a token lifetime of a year, or no expiry at all, because it makes "stay logged in" easy.
Test it: check the token's expiry. If you use a managed provider, look at its session settings. For a hand-rolled setup, you can paste a JWT into a decoder like jwt.io and read the exp field.
A fix that makes the error go away is not necessarily a fix
When you hit one of these and paste it into your coding tool, watch what the fix does. The classic pattern with authentication is that the tool removes the check that caused the error. "Unauthorized" disappears from your screen because the code no longer checks for authorisation.
After any change to login, sessions or permissions, run the original test again. Do not take the explanation at face value, because the explanation and the code do not always match.
If you only have time for a few
Do the first three. Calling an endpoint without logging in, changing an ID in a URL, and editing the user ID in a request body between them find the overwhelming majority of serious authentication holes in AI-built apps, and none of them need you to read any code.
If you would like a developer to go through this properly, Vibe Code Guardian's launch-readiness audit checks your app against 137 points across 14 areas, with each finding confirmed by a person, and gives you a ranked list of fixes. The free surface check is a lighter starting point that looks at what is publicly visible on a domain you own. It is not a full security review and it does not test your login flows, so treat it as a first look. You can compare the options on the packages page.