diff --git a/crates/tranquil-oauth-server/src/endpoints/authorize/consent.rs b/crates/tranquil-oauth-server/src/endpoints/authorize/consent.rs index 0eb66d4..0f6a11c 100644 --- a/crates/tranquil-oauth-server/src/endpoints/authorize/consent.rs +++ b/crates/tranquil-oauth-server/src/endpoints/authorize/consent.rs @@ -529,14 +529,6 @@ pub async fn consent_post( ); } let approved_scope_str = final_approved.join(" "); - let has_valid_scope = final_approved.iter().all(|s| is_valid_scope(s)); - if !has_valid_scope { - return json_error( - StatusCode::BAD_REQUEST, - "invalid_request", - "Invalid scope format", - ); - } if form.remember { let preferences: Vec = presented_items .iter() diff --git a/crates/tranquil-oauth-server/src/endpoints/authorize/mod.rs b/crates/tranquil-oauth-server/src/endpoints/authorize/mod.rs index e915240..0d50292 100644 --- a/crates/tranquil-oauth-server/src/endpoints/authorize/mod.rs +++ b/crates/tranquil-oauth-server/src/endpoints/authorize/mod.rs @@ -77,13 +77,6 @@ fn is_granular_scope(s: &str) -> bool { || s.starts_with("identity:") } -fn is_valid_scope(s: &str) -> bool { - !matches!( - tranquil_pds::oauth::scopes::parse_scope(s), - tranquil_pds::oauth::scopes::ParsedScope::Unknown(_) - ) -} - fn extract_device_cookie(headers: &HeaderMap) -> Option { headers .get("cookie")