An OAuth callback is often treated as the last, boring step of login. The user returns from the identity provider, the application reads a code , and a session is created. That mental model is too small.
The callback is where an application decides whether a response belongs to the login attempt that started in this browser. It needs a proof of intent, not just a valid-looking authorization code. This matters for normal web apps, admin tools, and test environments that use disposable mail for account setup. A dummy e mail address can be useful in a test, but it does not make a callback trustworthy by itself.
The callback must prove intent
OAuth has several values that look like ordinary request parameters: state , code , and sometimes an error response.…