From 2519f85fd711833ee25558dbd174515ac2e3c2d4 Mon Sep 17 00:00:00 2001 From: Simon Bihel Date: Fri, 4 Feb 2022 12:12:30 +0000 Subject: [PATCH] Trim scopes --- src/oidc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oidc.rs b/src/oidc.rs index 0a14d3c..f92661b 100644 --- a/src/oidc.rs +++ b/src/oidc.rs @@ -368,7 +368,7 @@ pub async fn authorize( } let _response_type = params.response_type.as_ref().unwrap(); - for scope in params.scope.as_str().split(' ') { + for scope in params.scope.as_str().trim().split(' ') { if !SCOPES.contains(&Scope::new(scope.to_string())) { return Err(anyhow!("Scope not supported: {}", scope).into()); }