Browser-Based Apps with a Backend support #9299
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: invalid
An issue that we don't feel is valid
Summary
Browser-Based App is JavaScript app with Spring boot backend.
https://tools.ietf.org/html/draft-ietf-oauth-browser-based-apps-07 - section 6.2
https://www.oauth.com/oauth2-servers/single-page-apps/
The best explanation of the problem is here:
#6638 (comment)
It seems there was attempt to fix it here:
#6812
and here
#8118 - WebFlux
Two more requests for this enhancement and attempts to resole it:
#9266
#8950
three more very closely related issues:
#7586
#6802
#4968 - httpBasic() can not be combined with oauth2Login() but it can be combined with formLogin()
Expected Behavior
HTML - 302
REST - 401
Current Behavior
HTML - 302
REST - 302
Context
I will write test to make sure that formLogin() works with oauth2Login() in WebFlux.
JavaScript should get 401 if it sends unauthenticated request.
If there is more then one client registration or formLogin() - response should contain location header with /login
If there is only one registration - response should contain location header with /oauth2/authorization/{registrationId}
Then JavaScript will redirect browser to location from response header. After successful login oauth2Login() should redirect browser to /. Javascript will be loaded in browser again and browser will have active http only session with Spring Boot to access API.
@jgrandja @rwinch @jzheaux what do you think?
The text was updated successfully, but these errors were encountered: