Configure Open edX as an OAuth 2.0 authentication provider
Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.
Open edX Platform can be configured as an OAuth 2.0 provider. Follow the steps below:
- Log in to the server console.
- Navigate to the installdir/apps/edx/conf directory.
- Modify the lms.env.json file and set ENABLE_OAUTH2_PROVIDER to True.
- Modify the cms.env.json file and set ENABLE_OAUTH2_PROVIDER to True.
Restart the Apache server:
$ sudo installdir/ctlscript.sh restart apache
You should now be able to access the OAuth 2.0 access token by sending a POST request to http://localhost/oauth2/access_token.