fix menu
This commit is contained in:
@@ -21,7 +21,7 @@ from layercake.dynamodb import (
|
||||
from layercake.funcs import omit, pick
|
||||
|
||||
from boto3clients import dynamodb_client
|
||||
from config import ISSUER, OAUTH2_SCOPES_SUPPORTED, OAUTH2_TABLE
|
||||
from config import ISSUER, OAUTH2_DEFAULT_SCOPES, OAUTH2_SCOPES_SUPPORTED, OAUTH2_TABLE
|
||||
from integrations.apigateway_oauth2.authorization_server import (
|
||||
AuthorizationServer,
|
||||
)
|
||||
@@ -191,10 +191,11 @@ class AuthorizationCodeGrant(grants.AuthorizationCodeGrant):
|
||||
rename_key='scope',
|
||||
),
|
||||
)
|
||||
scope = set(user.get('scope', [])) | OAUTH2_DEFAULT_SCOPES
|
||||
|
||||
return User(
|
||||
**pick(('id', 'name', 'email', 'email_verified'), user),
|
||||
scope=' '.join(user['scope']) if 'scope' in user else None,
|
||||
scope=' '.join(scope),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user