Hi,

it would be nice to have mentioned in documentation that forward headers has to be used when app is behind proxy servers to correctly handle OAuth redirections.

  • See https://github.com/spring-projects/spring-security/issues/5270 for details

  • See https://docs.spring.io/spring-boot/docs/current/reference/html/howto-embedded-web-servers.html#howto-use-tomcat-behind-a-proxy-server for Spring Boot documentation

  • Good place could be around default URL template section https://docs.spring.io/spring-security/site/docs/5.2.0.M4/reference/htmlsingle/#oauth2login-sample-redirect-uri

I could create PR, but I dont know if there is some rules for documentation hyperlinking.

Thx

Ivos

Comment From: jgrandja

Thanks for the report @bedla. I agree, we could improve the documentation by referencing existing documentation related to Forwarded Headers (ForwardedHeaderFilter).

Would you be interested in submitting a PR?

Comment From: bedla

I will, no problem :)

Comment From: bedla

PR here https://github.com/spring-projects/spring-security/pull/7325

Comment From: akshayrrao-Sclera

Hi i was working with Oauth2 login with google , facebook and github and it seems to be working fine when i run it locally but if i run behind reverse proxy i am getting [authorization_request_not_found] in callback_url any solution?