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

  1. Record the actual URL and parameters before sign-in.
  2. Check that the callback matches the environment and provider configuration.
  3. 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

Official reference

VCT Editorial

All answers