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

One shot auth #1002

Closed geekscrapy closed 7 years ago

geekscrapy commented 8 years ago

Hi I'm making an app which requires non authorised users to authenticate using a social account (facebook, flickr, twitter etc.) to join an 'event'. This authorisation is then used to access parts of the user's account (wall feed etc) on their behalf (in the background).

Is there a view that asks a non-authorised user (one without credentials to the main site) to authorise to the site via whatever social account type that is required (some events might need facebook, other's twitter) and then dump them back to a page saying 'thanks' and thats the end of the workflow. Therefore not logging them in as such, just creating the User I can attach to the event with their newly associated social authentication tokens etc.

I've thought: once the user is created and returned, could I just make the User 'non-active' to stop login?

Is there a view for each of the social auth types that would allow me to do this?

omab commented 7 years ago

You can override the complete view and with that determine the login behavior by setting your custom login function.