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>"
EMAIL_DOMAIN = "<Domain to be appended on the end of email (eg: email.com)>"
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"
],
"logout_url": "https://YOUR_AUTHO_DOMAIN/logout?returnTo=YOUR_LMS_LOGOUT_URL"
}
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
Metadata
Release files for auth0-oauth2-backend 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| auth0_oauth2_backend-1.0.4.tar.gz | 5.9 kB | Without provenance | Details for auth0_oauth2_backend-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| auth0_oauth2_backend-1.0.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for auth0_oauth2_backend-1.0.4-py2.py3-none-any.whl |
Total release size: 11.3 kB
Release files / auth0_oauth2_backend-1.0.4.tar.gz
| Download URL | auth0_oauth2_backend-1.0.4.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e91652359c14ffb8562a7c8c2fa0dc9435cb407c4f56654fbcad732a0092eed1
|
|
BLAKE2b-256 checksum How to use checksums |
6f7e26b9342a77a03030dffb95f53ddb2de18972d17c8a620573f26c71b685f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.10
|
Release files / auth0_oauth2_backend-1.0.4-py2.py3-none-any.whl
| Download URL | auth0_oauth2_backend-1.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
6c9b65466a0a581c16197c95cc73955fdd82c45bcd2cda1f64134e046db7d368
|
|
BLAKE2b-256 checksum How to use checksums |
1da8f3b5d9d6c8f27dfcf9fc6ada01b59c8886b3ad7c4e5f9c3f29268e8ae111
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.10
|
Security for auth0-oauth2-backend 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.