[feat] Add user_id scope to credentialsApiClient (#28737)

Now that we're actively using the LMS_USER_ID inside credentials to
identify users, we need to make sure that users created by
notify_credentials are including it in the jwt scopes when authenticated
with credentials.
This commit is contained in:
Thomas Tracy
2021-09-15 09:17:51 -04:00
committed by GitHub
parent b1b750944b
commit 6f44841deb

View File

@@ -34,7 +34,8 @@ def get_credentials_api_client(user, org=None):
org (str): Optional organization to look up the site config for, rather than the current request
"""
jwt = create_jwt_for_user(user)
scopes = ['email', 'profile', 'user_id']
jwt = create_jwt_for_user(user, scopes=scopes)
if org is None:
url = CredentialsApiConfig.current().internal_api_url # by current request