auth-node: avoid passing through empty scope in start

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-09-25 20:09:39 +02:00
parent 6c2b0793bf
commit 911d90e306
@@ -136,7 +136,7 @@ export function createOAuthRouteHandlers<TProfile>(
// 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;
}