Skip to content

why context processor replace hyphen by underscore in google-oauth2 ? #457

@petitchamp

Description

@petitchamp

Could any one explain why this replace is done ?
Moreover, the code in function does not remove the original backend which has a hyphen in the name.
This cause my app got a backend list with google_oauth2 and google-oauth2 at the same time.

def social_auth_by_name_backends(request):
"""Load Social Auth current user data to context.
Will add a social_auth object whose attribute names are the names of each
provider, e.g. social_auth.facebook would be the facebook association or
None, depending on the logged in user's current associations. Providers
with a hyphen have the hyphen replaced with an underscore, e.g.*
google-oauth2 becomes google_oauth2 when referenced in templates.*
"""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions