Skip to content

Social Login with Discord example script causes exception #18025

@TMUniversal

Description

@TMUniversal

Do you see an area that can be clarified or expanded, a technical inaccuracy, or a broken link? Please describe.
The Discord social login documentation provides example scripts to use for several purposes, but the guild member checking script has an issue.
When used as-is (adjusting the guild id as instructed), the policy causes an exception when executed.
It is lacking an import for OAuthSource and thus cannot succeed.

Provide the URL or link to the exact page in the documentation to which you are referring.
https://docs.goauthentik.io/users-sources/sources/social-logins/discord/

Describe the solution you'd like
Please update the provided scripts, such that they work immediately.
Suggested solution: please add an import to the script.

from authentik.sources.oauth.models import OAuthSource

Additional context
Add any other context or screenshots about the documentation issue here.

Consider opening a PR!
If the issue is one that you can fix, or even make a good pass at, we'd appreciate a PR. For more information about making a contribution to the docs, and using our Style Guide and our templates, refer to "Writing documentation".

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:docsFeatures or issues related to DocusaurusdocumentationImprovements or additions to documentationneeds_documentationQuestions/Issues that require additional documentation

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions