Merge pull request #86 from christianlouis/copilot/fix-asgi-application-exception
Fix AttributeError: Scope.offlineAccess removed in logto SDK 0.2.x
This commit is contained in:
@@ -17,7 +17,8 @@ from typing import Optional
|
|||||||
|
|
||||||
from fastapi import Request, Response
|
from fastapi import Request, Response
|
||||||
from jose import JWTError, jwt
|
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 sqlalchemy.orm import Session
|
||||||
|
|
||||||
from app.core.config import get_settings
|
from app.core.config import get_settings
|
||||||
@@ -125,7 +126,7 @@ def make_logto_client(storage: CookieStorage) -> LogtoClient:
|
|||||||
scopes=[
|
scopes=[
|
||||||
UserInfoScope.email,
|
UserInfoScope.email,
|
||||||
UserInfoScope.profile,
|
UserInfoScope.profile,
|
||||||
Scope.offlineAccess,
|
OAuthScope.offlineAccess,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
storage=storage,
|
storage=storage,
|
||||||
|
|||||||
Reference in New Issue
Block a user