From 911d90e306ca9006d3e902b3ec07966da6406dc9 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 25 Sep 2023 20:09:39 +0200 Subject: [PATCH] auth-node: avoid passing through empty scope in start Signed-off-by: Patrik Oldsberg --- plugins/auth-node/src/oauth/createOAuthRouteHandlers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/auth-node/src/oauth/createOAuthRouteHandlers.ts b/plugins/auth-node/src/oauth/createOAuthRouteHandlers.ts index a455837035..165d7ce6b3 100644 --- a/plugins/auth-node/src/oauth/createOAuthRouteHandlers.ts +++ b/plugins/auth-node/src/oauth/createOAuthRouteHandlers.ts @@ -136,7 +136,7 @@ export function createOAuthRouteHandlers( // If scopes are persisted then we pass them through the state so that we // can set the cookie on successful auth - if (authenticator.shouldPersistScopes) { + if (authenticator.shouldPersistScopes && scope) { state.scope = scope; }