Skip to content

Browser-Based Apps with a Backend support #9299

@iilkevych

Description

@iilkevych

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?

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)status: invalidAn issue that we don't feel is valid

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions