Skip to content

override _extract function in SAMLProvider without creating a new Provider #4176

Answered by pennersr
mgogoulos asked this question in Q&A
Discussion options

You must be logged in to vote

It's undocumented, but, you can override the provider class like so:

SOCIALACCOUNT_PROVIDERS = {
    "google": {
        "APP": {
           ...
        },
        "provider_class": "your.own.package.CustomGoogleProvider",
    },

Then, your custom provider class can simply inherit from the original one and tweak where needed.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mgogoulos
Comment options

@pennersr
Comment options

@mgogoulos
Comment options

Answer selected by mgogoulos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants