From 9f5e2c12585433e0e02e7b6e5581b8a37a2115fc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 30 Mar 2026 15:57:24 +0000 Subject: [PATCH] fix: use OAuthScope.offlineAccess instead of Scope.offlineAccess for logto SDK compatibility Agent-Logs-Url: https://github.com/christianlouis/dmarq/sessions/2982bcbd-abe6-474a-94ff-e7c6aabe4890 Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- backend/app/core/logto.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/app/core/logto.py b/backend/app/core/logto.py index 3112116..372837e 100644 --- a/backend/app/core/logto.py +++ b/backend/app/core/logto.py @@ -17,7 +17,8 @@ from typing import Optional from fastapi import Request, Response from jose import JWTError, jwt -from logto import IdTokenClaims, LogtoClient, LogtoConfig, PersistKey, Scope, Storage, UserInfoScope +from logto import IdTokenClaims, LogtoClient, LogtoConfig, PersistKey, Storage, UserInfoScope +from logto.models.oidc import OAuthScope from sqlalchemy.orm import Session from app.core.config import get_settings @@ -125,7 +126,7 @@ def make_logto_client(storage: CookieStorage) -> LogtoClient: scopes=[ UserInfoScope.email, UserInfoScope.profile, - Scope.offlineAccess, + OAuthScope.offlineAccess, ], ), storage=storage,