-
Notifications
You must be signed in to change notification settings - Fork 6.1k
WebFlux oauth2Login returns 500 when bad client credentials #5562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In my opinion this is a this is a configuration error that should result in a 500. Why should we do this? |
See invalid_client |
@jgrandja I'm not sure I understand. All I see is what the authorization server should do. This code is discussing changes to the client. |
@rwinch I agree that it's a configuration error but we should at least help the user by displaying the error message coming back from the Authorization Server so they have some indication on where to resolve the issue. Here are the results when I tried the Servlet-based Okta |
Thanks for the response. This does seem like a reasonable improvement, but I don't see this as broken. I'd guess that URL includes the same error information in it so the user should be able to figure it out. |
I think that there is value in bringing the reactive experience into parity with the servlet experience. It would be nice if both redirected to "/login?error" (servlet-based oauth2Login already does this). To achieve this, though, there are some more basic features, as I see it. @rwinch @jgrandja do these two features seem reasonable for Reactive applications? If so, I'll create tickets for those. |
It is tricky because we don't want to reveal too much information about the log in failure. In general, explaining too much information (i.e. the username does not exist, the password is invalid, etc) is not recommended. If there is a failure in the systems, then I think the general error page should be used rather than our default log in page trying to handle it. |
Uh oh!
There was an error while loading. Please reload this page.
When WebFlux
oauth2Login
is configured with 1ClientRegistration
that has bad client credentials, a 500 response will occur during the processing of the Authorization Response when attempting to exchange thecode
for theaccess_token
. The parameters from the authorization response are also viewable in the browser location bar.We should ensure a redirect to the default login page to display the error message, for example,
[invalid_client] Unauthorized
.The text was updated successfully, but these errors were encountered: