From c58f8264f1d646faaf97ebd6647ec5a9d19df553 Mon Sep 17 00:00:00 2001 From: Markus Date: Thu, 12 Oct 2023 17:55:27 +0200 Subject: [PATCH] fix: empty scope in oidc client response Signed-off-by: Markus --- plugins/auth-backend/src/providers/oidc/provider.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/auth-backend/src/providers/oidc/provider.ts b/plugins/auth-backend/src/providers/oidc/provider.ts index 7638027b01..b6608aebbd 100644 --- a/plugins/auth-backend/src/providers/oidc/provider.ts +++ b/plugins/auth-backend/src/providers/oidc/provider.ts @@ -130,6 +130,9 @@ export class OidcAuthProvider implements OAuthHandlers { if (!tokenset.access_token) { throw new Error('Refresh failed'); } + if (!tokenset.scope) { + tokenset.scope = req.scope; + } const userinfo = await client.userinfo(tokenset.access_token); return {