omab / python-social-auth

Social auth made simple
http://psa.matiasaguirre.net
BSD 3-Clause "New" or "Revised" License
2.83k stars 1.09k forks source link

retrieving values from FIELDS_STORED_IN_SESSION #987

Closed tisdall closed 7 years ago

tisdall commented 8 years ago

I tried adding a GET arg to SOCIAL_AUTH_FIELDS_STORED_IN_SESSION and the value is properly added to the session. However, the docs seem to be wrong about retrieving that data: https://github.com/omab/python-social-auth/blob/v0.2.19/docs/developer_intro.rst#interrupting-the-pipeline-and-communicating-with-views

The docs say to use request.get('local_password', None) (in the example in the docs), however the value is actually at strategy.session_get('local_password'). I'm using Django so I'm unsure about other setups/strategies.

Tatsh commented 8 years ago

Thank you. I was so confused and spent at least an hour debugging what was going on. We really need the documentation updated for this.

omab commented 7 years ago

Docs updated

tisdall commented 7 years ago

uh.. it seems you changed one instance of getting 'local_password' from the request and left the rest. The comment above that mentions request['local_password'] and below that is user.set_password(request['local_password']).

omab commented 7 years ago

Done.

Thanks