Why does login return a user to the wrong page?
The starting page, OAuth callback and post-login navigation are separate steps. Carry the requested destination safely and validate its allowed domain and path.
How to check it
- Record the actual URL and parameters before sign-in.
- Check that the callback matches the environment and provider configuration.
- Test login, cancellation, an expired session and a new tab.
Concrete example
Example: an advertising application’s placement parameter should survive login. If the user lands on the homepage, inspect destination propagation rather than replacing the parameter with a hard-coded product.
Avoid a false conclusion
Do not accept arbitrary external redirect URLs. Authentication does not imply a paid entitlement or administrator permission.
Reference
VCT Editorial