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.*
"""
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.*
"""