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

Added transaction support around user creation to prevent race conditions #974

Closed carsongee closed 8 years ago

carsongee commented 8 years ago

This is basically the same change made in #770 but this adds transaction support around creating the user object as well. The reasoning here is a bit different than #770 as this is just intended to prevent request failures in scenarios where a client is logging in for the first time simultaneously via multiple parallel API calls using token authentication and creating 500 responses as a result of the user being created in a different fork.