Adolfo R. Brandes 3c445adf8e feat: Add support for the Learner Record MFE
And while we're at it:

* Fix an issue with development mode OAUTH2
* Fix the OAUTH2 LMS configuration variables; it wasn't possible to
  change them in production
2023-12-09 15:31:41 +01:00

51 lines
1.9 KiB
Plaintext

# Modify users created with an incorrect email and that might clash with the newly created users
./manage.py lms shell -c \
"from django.contrib.auth import get_user_model;\
get_user_model().objects.filter(username='credentials').exclude(email='credentials@openedx').update(email='credentials@openedx')"
./manage.py lms manage_user credentials credentials@openedx --staff --superuser --unusable-password
# Development client
./manage.py lms create_dot_application \
--grant-type client-credentials \
--redirect-uris "http://{{ CREDENTIALS_HOST }}:8150/complete/edx-oauth2/" \
--client-id {{ CREDENTIALS_OAUTH2_KEY_DEV }} \
--client-secret {{ CREDENTIALS_OAUTH2_SECRET }} \
--scopes user_id \
--skip-authorization \
--update \
credentials-dev \
credentials
./manage.py lms create_dot_application \
--grant-type authorization-code \
--redirect-uris "http://{{ CREDENTIALS_HOST }}:8150/complete/edx-oauth2/" \
--client-id {{ CREDENTIALS_OAUTH2_KEY_SSO_DEV }} \
--client-secret {{ CREDENTIALS_OAUTH2_SECRET_SSO }} \
--scopes user_id \
--skip-authorization \
--update \
credentials-sso-dev \
credentials
# Production client
./manage.py lms create_dot_application \
--grant-type client-credentials \
--redirect-uris "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ CREDENTIALS_HOST }}/complete/edx-oauth2/" \
--client-id {{ CREDENTIALS_OAUTH2_KEY }} \
--client-secret {{ CREDENTIALS_OAUTH2_SECRET }} \
--scopes user_id \
--skip-authorization \
--update \
credentials \
credentials
./manage.py lms create_dot_application \
--grant-type authorization-code \
--redirect-uris "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ CREDENTIALS_HOST }}/complete/edx-oauth2/" \
--client-id {{ CREDENTIALS_OAUTH2_KEY_SSO }} \
--client-secret {{ CREDENTIALS_OAUTH2_SECRET_SSO }} \
--scopes user_id \
--skip-authorization \
--update \
credentials-sso \
credentials