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; }