create_dot_application

This commit is contained in:
lpm0073 2022-09-13 22:05:53 -05:00
parent 8db5aa9771
commit d762fe310b

View File

@ -0,0 +1,57 @@
# 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 }}:8130/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 }}:8130/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
# Create commerce configuration
#./manage.py lms configure_commerce
# Enable order bistory microfrontend
#site-configuration set ENABLE_ORDER_HISTORY_MICROFRONTEND true
#(./manage.py lms waffle_switch --list | grep order_history.redirect_to_microfrontend) || ./manage.py lms waffle_switch --create order_history.redirect_to_microfrontend on