An Open edX Python Social Auth backend for Tutor Auth0
Project description
Overview
This is a custom backend for Open edX that allows users to authenticate using Auth0. It also supports OTP login for users who have enabled it in their Auth0 account.
Usage
1. Add this package to your project’s requirements
Add this project to your extra pip requirements.
OPENEDX_EXTRA_PIP_REQUIREMENTS:
- git+https://github.com/blend-ed/auth0-oauth2-backend.git
2. Configure your Open edX LMS application
from tutor import hooks
hooks.Filters.ENV_PATCHES.add_items(
[
(
"openedx-common-settings",
"""
AUTH0_DOMAIN = "<YOUR_AUTH0_DOMAIN>"
AUTH0_AUDIENCE = "<YOUR_AUTH0_AUDIENCE>"
TPA_AUTOMATIC_LOGOUT_ENABLED = True
""",
),
(
"lms-env",
"""
THIRD_PARTY_AUTH_BACKENDS: [
"auth0_oauth2.auth0.Auth0OAuth2",
"social_core.backends.google.GoogleOAuth2",
"common.djangoapps.third_party_auth.saml.SAMLAuthBackend",
"django.contrib.auth.backends.ModelBackend"
]
SOCIAL_AUTH_AUTH0_PLUGIN_FIELDS_STORED_IN_SESSION:
- "auth_entry"
ADDL_INSTALLED_APPS:
- "auth0_oauth2"
"""
),
(
"common-env-features",
"""
ENABLE_THIRD_PARTY_AUTH: true
"""
)
]
)
3. Configure your Auth0 provider configurations
This is the code to be placed in the other settings field:
{
"DOMAIN": <Your Auth0 domain>,
"DEFAULT_SCOPE": [
"openid",
"profile",
"email"
]
}
Images
4. Configure your Auth0 application in Auth0 dashboard
Go to your Auth0 dashboard
Click on settings and then go to the advanced settings
Add the logout URL of your Open edX instance in the allowed logout URLs
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file auth0_oauth2_backend-1.0.3.tar.gz
.
File metadata
- Download URL: auth0_oauth2_backend-1.0.3.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcf1348a1d7f65772a7016b3b5dec1d46abd7d7bebcb19ac0644f0aebcf23814 |
|
MD5 | 2e97871026fe8ac142ababe790e56625 |
|
BLAKE2b-256 | cd30626d5a27c5c07a36effaccdc251f79755c42ddeaed1c82c090580a7857e6 |
File details
Details for the file auth0_oauth2_backend-1.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: auth0_oauth2_backend-1.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 342ad0a1f5b247ae3a029609bf2ed03d1063dbb97cf23e40a7f3b4a93463e038 |
|
MD5 | ed04b970f450151f18d238fd483ac0c6 |
|
BLAKE2b-256 | 26892c271a0a6f88f82416df5a3ded5dcb5a1e7f0c41d0a3b1a987beabff9c6d |