-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Facebook/Twitter Login Error - "this auth is already used" #1025
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
Comments
Are you with any chance having anonymousUsers on the client?? |
Yes, I have anonymous users on, but I also thought they are on by default in Parse Server. The way I have it in my app is when a user first opens the app an anonymous user is created for them. The anonymous user is then transitioned to a regular user when they sign up. If they already have an account the anonymous user is deleted when they log in. |
Can you run your parse-server with the VERBOSE environment variable set to 1 (VERBOSE=1) so I can have a look at the login request that is failing? Can you also post the code that you're using client side? |
Where do I set VERBOSE=1? Also, do you want all of the client code I use for logging in with Twitter/FB? |
are you running parse-server locally or deployed somewhere? |
Heroku (this is my first time doing anything like this) |
|
|
That's what I thought, the request that's being sent is a PUT on the user, so it tries to link the current user (that is anonymous) with the twitter user that it finds. It can't link it as the objectId's don't match. @nlutsenko I just had a look with the iOS SDK: https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/blob/749a46f1663772272e75cfa195b5732827d8d2fa/Parse/Internal/User/AuthenticationProviders/Controller/PFUserAuthenticationController.m#L116 I see here that when the currentUser is anonymous, the login method will try to link the user instead of doing a proper 'login'. How should we handle that server side? EDIT: I now see that it tries to login upon unsuccessful attempt to link. |
similar to #996 |
@PatrickAdams any chance in the logs just after the |
No, from what I can tell there is no POST after the PUT. |
The SDK is supposedly sending it when you have anonymous users enabled. |
Is there anything I can do now or do I just need to wait for a fix? |
I'm really not sure about that problem, that's what bothering me... |
@PatrickAdams can you try the branch associated with that PR: #1081 |
@flovilmart I set up my project using parse-server-example so in that case will parse-server stay up to date with master? Also, how would I test out your PR? I don't actually have parse-server cloned, just the example project. |
so, if you're using parse-server-example:
|
@flovilmart was your branch merged? I don't see it anymore. |
yes it's been merged, you can use master then |
@flovilmart it seems to have fixed the issue! |
Nice! Do you confirm that with VERBOSE=1 you have a proper POST after the failed PUT? |
yes. |
YAY! nice!! Such a stupid bug... Anyhow, I'll close it now, if the error occurs again, please reopen! |
Hi!
UPD: |
@andrey-krukovskiy sorry for the late response. Did you manage to isolate the race condition? Can you confirm this is 2 concurrent requests that makes it fail (with the logs) |
@flovilmart No, I did not. Cannot reproduce it now on parse-server 2.2.18 |
I'm getting the same error when trying to log in with Twitter as well as with Facebook as specified in #313
I have my parse server set up as follows.
The text was updated successfully, but these errors were encountered: