-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get() returned more than one UserSocialAuth -- it returned 2! #553
Comments
Anyone? |
The steam username is used as a base to the user username, if it's duplicated, then a extra hash will be added (so they are never repeated), also, if the user changes his username in steam, it won't change the username in your site (username is defined only once). You are getting that error because you have two steam accounts associated to a single user, python-social-auth doesn't put any constraint to that, you can have several accounts from the same provider associated to a given user. You should do |
That's the problem here, it doesn't seem to add an extra hash when there are collisions. I logged in using two different Steam accounts with the same username then this happened. Anyway, I solved the problem by writing a custom pipeline to replace usernames with Steam UIDs, it's good enough for my requirements. Thanks! |
Has this been solved? I am facing the same issue. @CrimsonRay: Could you provide your pipeline code? |
I'm trying to implement Steam login into my project, and I get the error
get() returned more than one UserSocialAuth -- it returned 2!
when I try to douser.social_auth.get(provider='steam')
. This seems to happen when someone has the same username—the rows in social_auth_usersocialauth are associated to the same auth.User. Attached an image to show what I mean:As a side note, is it a good idea to store the Steam name as username field in auth.User? Steam names can be changed and are not unique. I think it's better to just return something unique for the username field, like UID.
The text was updated successfully, but these errors were encountered: