Search code examples
pythonstormpath

Stormpath (python) - get provider data


I'm using stormpath-sdk-python with social authentication. After my user login - the api return the account information with provider_data attribute. But this is useless since its not accessible.

How can I access the provider data of the user? I've been search a lot in the docs - but nothing.


Solution

  • Once you've authenticated a user with social authentication, you can indeed access the provider data using... provider_data as a dictionary.

    Here's an example:

    print('Provider data: {}'.format(dict(provider_data)))