Skip to content

Backends: user_data vs extra_data? #759

@pzrq

Description

@pzrq

https://github.com/omab/python-social-auth/blob/v0.2.13/docs/backends/implementation.rst

EXTRA_DATA = None
During the auth process some basic user data is returned by the provider or retrieved by user_data() method

  • This doc indicates EXTRA_DATA is related to user_data(), and indeed goes on to show two code examples with backend.user_data() implemented.
  • However social.pipeline.social_auth.load_extra_data actually calls backend.extra_data(), not backend.user_data().

This suggests the backend.user_data() function is never called by PSA with the default SOCIAL_AUTH_PIPELINE.

  • Facebook2OAuth2 appears to be one exception, calling user_data() as part of do_auth though it seems to be a relatively uncommon flow out of the 100 or so backend providers.

So what are backend.user_data and backend.extra_data supposed to be used for?

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