For whoever is still working to add OAuth2 to Tutor.
Here is our plugin:
name: third-party-auth
version: 1.0.0
patches:
common-env-features: |
"ENABLE_THIRD_PARTY_AUTH": true
openedx-auth: |
"SOCIAL_AUTH_OAUTH_SECRETS": {"google-oauth2": "client-secret-from-google"}
lms-env: |
"THIRD_PARTY_AUTH_BACKENDS": ["social_core.backends.google.GoogleOAuth2"]
Then, go to “Provider Configuration (OAuth)” in your Django admin panel:
Home › Third-party authentication › Provider Configuration (OAuth)
- URL: admin/third_party_auth/oauth2providerconfig/
Click “ADD PROVIDER CONFIGURATION (OAUTH)” to add your provider.
We use these settings, but your might be slightly different.
- Icon class: fa-google
- Skip registration form
- Skip email verification
- Send welcome email
- Visible
- Backend name: google-oauth2
- Client ID: Enter client ID from the OAuth2 provider
- Client Secret: (leave blank! The value is in the plugin.)
Use the “Enabled” checkbox at the top of the page to enable or disable the OAuth2 login button.
That’s it!