Closed
Description
The
code
(authorization_code
) is a temporary credential that can be used one-time only, hence, theAUTHORIZATION_REQUEST_NOT_FOUND
error.
The problem is not in authorization_code
. AuthenticationWebFilter
has authenticationFailureHandler
to handle invalid authentication(authorization_code
). OidcAuthorizationCodeReactiveAuthenticationManager
throws OAuth2AuthenticationException
which is AuthenticationException
and browser is redirected to /login?error
The problem is in
ServerOAuth2AuthorizationCodeAuthenticationTokenConverter
it throwsOAuth2AuthorizationException
andAuthenticationWebFilter
doesn't handle any errors fromServerAuthenticationConverter
Only one ServerAuthenticationConverter implementation will redirect browser to login page
ServerHttpBasicAuthenticationConverter
cause it return Mono.empty()
in case of any authentication problem
Originally posted by @iilkevych in #7884 (comment)