fix token

This commit is contained in:
2025-10-24 21:33:02 -03:00
parent c4509f5072
commit 2fba9ba059
2 changed files with 11 additions and 4 deletions

View File

@@ -76,7 +76,7 @@ class OpenIDCode(OpenIDCode_):
).filter(scope)
if user.scope:
user_info['scope'] = ' '.join(user.scope)
user_info['scope'] = user.scope
return user_info
@@ -175,10 +175,17 @@ class AuthorizationCodeGrant(grants.AuthorizationCodeGrant):
user = dyn.collection.get_items(
TransactKey(authorization_code.user_id)
+ SortKey('0')
+ SortKey('SCOPE', path_spec='scope', rename_key='scope'),
+ SortKey(
sk='SCOPE',
path_spec='scope',
rename_key='scope',
),
)
return User(**pick(('id', 'name', 'email', 'email_verified', 'scope'), user))
return User(
**pick(('id', 'name', 'email', 'email_verified'), user),
scope=' '.join(user['scope']) if 'scope' in user else None,
)
class TokenExchangeGrant(grants.BaseGrant):