Skip to content

OAuth2 Pushed Authorization Request request_uri expiry is too short #2024

Closed
@said026

Description

@said026

Expected Behavior
The expires_in field in the PAR (Pushed Authorization Request) endpoint should be configurable, allowing flexibility to adjust the duration based on specific deployment needs.

Current Behavior
The expires_in value is currently hardcoded to 30 seconds (cf OAuth2PushedAuthorizationRequestUri.java), this is limiting and resulting in a very short window for users to finalize the authorization flow.

Context
This limitation affects user experience by providing only 30 seconds to finalize the authorization flow after generating the PAR.

Additional note
At the end of the authorization process, the user is redirected back to the initial /authorize request (e.g.,
http://localhost:8080/oauth2/authorize?client_id=my-client-id&request_uri=urn:ietf:params:oauth:request_uri:g3uYrr-vcFsPlKTvGMmaIAAJUClbQLAoCiAQebp2lII=___1747987199473).
At this stage, the request_uri is validated again, so it must not be expired.

This behavior is due to Spring Security's flow, which redirects back to /authorize at the end of the authentication process.
However, this second validation might not be compliant with RFC 9126, The RFC is unclear whether the expires_in parameter relates to the time between the initial /par request and the first /authorize call (which consumes the request_uri), or if it concerns the total duration of completing the entire authorization flow.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions