Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 10, 2025

The Auth0OAuth2 backend exists in social-core but was undocumented, leaving users unable to discover or configure it.

Changes

  • Added docs/backends/auth0.rst: Documentation for the Auth0OAuth2 backend including:

    • Setup instructions with Auth0 Dashboard registration
    • Required settings: SOCIAL_AUTH_AUTH0_KEY, SOCIAL_AUTH_AUTH0_SECRET, SOCIAL_AUTH_AUTH0_DOMAIN
    • Backend configuration and scope customization
    • Cross-reference to the newer Auth0OpenIDConnect implementation
  • Updated docs/backends/index.rst: Added auth0 entry in alphabetical order between arcgis and auth0_openidconnect

Usage

SOCIAL_AUTH_AUTH0_KEY = 'your-client-id'
SOCIAL_AUTH_AUTH0_SECRET = 'your-client-secret'
SOCIAL_AUTH_AUTH0_DOMAIN = 'yourdomain.auth0.com'

AUTHENTICATION_BACKENDS = (
    'social_core.backends.auth0.Auth0OAuth2',
)

# Optional: customize scopes
SOCIAL_AUTH_AUTH0_SCOPE = ['openid', 'profile', 'email']

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • docs.python.org
    • Triggering command: /usr/bin/python3 /home/REDACTED/.local/bin/sphinx-build -b html -d _build/doctrees . _build/html (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Auth0 is missing from docs</issue_title>
<issue_description>### Expected behaviour

Documentation exists for Auth0 which is supported in the code as a backend: https://github.com/python-social-auth/social-core/blob/master/social_core/backends/auth0.py

Actual behaviour

Describe what happens instead and why is it an issue.
No documentation exits for Auth0 Backend in the expected location (or any location): https://github.com/python-social-auth/social-docs/blob/master/docs/backends/index.rst

Flagging this as an issue for anyone looking for inspiration for documentation improvement pull requests.
</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add documentation for Auth0 backend Add Auth0 OAuth2 backend documentation Nov 10, 2025
Copilot AI requested a review from nijel November 10, 2025 11:56
Copilot finished work on behalf of nijel November 10, 2025 11:56
@nijel nijel requested a review from Copilot November 10, 2025 12:31
@nijel nijel marked this pull request as ready for review November 10, 2025 12:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds documentation for the Auth0 OAuth2 backend. The documentation covers the original Auth0OAuth2 backend and distinguishes it from the newer OpenID Connect implementation.

  • Adds auth0.rst documentation file with setup instructions, configuration examples, and scopes
  • Updates the backends index to include the auth0 backend reference in alphabetical order

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/backends/index.rst Adds auth0 backend to the table of contents in alphabetical order
docs/backends/auth0.rst New documentation file describing Auth0 OAuth2 setup, configuration, and scopes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +29 to +33
AUTHENTICATION_BACKENDS = (
...
'social_core.backends.auth0.Auth0OAuth2',
...
)
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setting name should be AUTHENTICATION_BACKENDS not SOCIAL_AUTH_AUTHENTICATION_BACKENDS. However, looking at other backend documentation files (e.g., apple.rst uses SOCIAL_AUTH_AUTHENTICATION_BACKENDS, azuread.rst uses AUTHENTICATION_BACKENDS, github.rst uses AUTHENTICATION_BACKENDS), there's inconsistency across the documentation. This file uses AUTHENTICATION_BACKENDS which matches github.rst and azuread.rst, so this is acceptable given the existing patterns.

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +41
SOCIAL_AUTH_AUTH0_SCOPE = ['openid', 'profile', 'email']

Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scopes documentation shows a Python list format ['openid', 'profile', 'email'], but the auth0_openidconnect.rst documentation shows scopes as a space-separated string: 'openid profile email offline_access'. For consistency and to avoid user confusion, consider clarifying which format is expected by the Auth0OAuth2 backend, or align the format with the auth0_openidconnect backend if both accept the same format.

Suggested change
SOCIAL_AUTH_AUTH0_SCOPE = ['openid', 'profile', 'email']
SOCIAL_AUTH_AUTH0_SCOPE = 'openid profile email'
You may also use a Python list (e.g., ``['openid', 'profile', 'email']``), but for consistency with other backends, a space-separated string is recommended.

Copilot uses AI. Check for mistakes.
@nijel nijel merged commit 0a7a4b3 into master Nov 10, 2025
14 checks passed
@nijel nijel deleted the copilot/add-auth0-documentation branch November 10, 2025 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Auth0 is missing from docs

2 participants