Skip to content
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

Facebook oauth data null after calling unlinkUserInBackground, cannot re-link facebook account. #996

Closed
3 tasks done
mnearents opened this issue Mar 12, 2016 · 12 comments
Closed
3 tasks done
Labels
type:question Support or code-level question

Comments

@mnearents
Copy link

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

Latest version of Parse-Server on Heroku with MongoLab.

Steps to reproduce

  1. Create a PFUser. In Parse Dashboard, oauth data is 'undefined' (which is good).
  2. Link the current user's account with facebook using [PFFacebookUtils linkUserInBackground:[PFUser currentUser]... dashboard shows facebook id and token under oauth
  3. Unlink the currentUsers account with facebook using '[PFFacebookUtils unlinkUserInBackground:[PFUser currentUser]...`
  4. Check Parse Dashboard, the oauth data field reads: {facebook: null}
  5. Call [PFFacebookUtils linkUserInBackground:[PFUser currentUser]... in the dashboard, the oauth field remains null

I can't re-link facebook until I delete the user account and re-sign up.

Logs/Trace

n/a

@flovilmart
Copy link
Contributor

I need the request logs from heroku when you call those operations. More importantly the full body of those requests

Thanks!

@flovilmart
Copy link
Contributor

@lususvir also we have a unit test covering exactly that use case here: https://github.com/ParsePlatform/parse-server/blob/master/spec/ParseUser.spec.js#L1281

I've run a test on my machine with signup, link, unlink, link and I don't manage to reproduce the error

@flovilmart
Copy link
Contributor

Does your user have a username and a password?

@mnearents
Copy link
Author

My user does have a username and password. Which is a whole other issue where whenever a user links facebook, their username gets replaced with a random string of text.

But here are the logs, I'm not a back-end developer (hence the reason I was using Parse.com), so if this isn't want you need, let me know:

Unlink

Mar 12 13:17:40 ancient-lake-41070 heroku/router: at=info method=POST path="/parse/classes/_User/aDl9d27udW" host=ancient-lake-41070.herokuapp.com request_id=c103684c-3a48-4a26-bf81-d22b6cfffcdf fwd="54.160.168.250" dyno=web.1 connect=0ms service=14ms status=404 bytes=534 

Mar 12 13:17:40 ancient-lake-41070 heroku/router: at=info method=PUT path="/parse/classes/_User/aDl9d27udW" host=ancient-lake-41070.herokuapp.com request_id=a7a3da45-b1ec-40f1-b8d7-6c1ccbab26e9 fwd="108.47.228.185" dyno=web.1 connect=1ms service=91ms status=200 bytes=507 

Re-Link

Mar 12 13:19:11 ancient-lake-41070 heroku/router: at=info method=GET path="/parse/classes/_User/aDl9d27udW" host=ancient-lake-41070.herokuapp.com request_id=4fffe252-2bad-4525-9186-12daf2b9aac9 fwd="108.47.228.185" dyno=web.1 connect=1ms service=644ms status=200 bytes=972 

Mar 12 13:19:18 ancient-lake-41070 heroku/router: at=info method=PUT path="/parse/classes/_User/aDl9d27udW" host=ancient-lake-41070.herokuapp.com request_id=6e231a02-6cf7-408a-a5c6-c102b49784d3 fwd="108.47.228.185" dyno=web.1 connect=0ms service=269ms status=200 bytes=507 

Mar 12 13:19:18 ancient-lake-41070 heroku/router: at=info method=POST path="/parse/classes/_User/aDl9d27udW" host=ancient-lake-41070.herokuapp.com request_id=dd7df747-035a-4bcb-9546-85d04aaa704d fwd="54.160.168.250" dyno=web.1 connect=1ms service=12ms status=404 bytes=534 

Mar 12 13:19:18 ancient-lake-41070 heroku/router: at=info method=GET path="/parse/classes/_User/aDl9d27udW" host=ancient-lake-41070.herokuapp.com request_id=af3e53ee-0303-4186-b301-e2bc3b8fccf4 fwd="108.47.228.185" dyno=web.1 connect=0ms service=52ms status=200 bytes=982 

Mar 12 13:19:19 ancient-lake-41070 heroku/router: at=info method=PUT path="/parse/classes/_User/aDl9d27udW" host=ancient-lake-41070.herokuapp.com request_id=19c01dc4-96d9-4c6e-a6f5-3e5960a85d06 fwd="108.47.228.185" dyno=web.1 connect=0ms service=56ms status=200 bytes=507 

Mar 12 13:19:19 ancient-lake-41070 heroku/router: at=info method=POST path="/parse/classes/_User/aDl9d27udW" host=ancient-lake-41070.herokuapp.com request_id=54bef2fe-54bb-47a4-9b19-6dd44973807e fwd="54.160.168.250" dyno=web.1 connect=0ms service=10ms status=404 bytes=534 

@flovilmart
Copy link
Contributor

Could you try setting VERBOSE=1 in the heroku environment so I have more information (including the request bodies) (https://devcenter.heroku.com/articles/config-vars#setting-up-config-vars-for-a-deployed-application)

@flovilmart
Copy link
Contributor

Wonderful! I'll be able to investigate a bit more from there.

@flovilmart
Copy link
Contributor

@lususvir can you use the master branch as described in #1025 I believe the error is fixed now

@mnearents
Copy link
Author

I started with the parse server example, can I just run npm update parse-server?

@flovilmart
Copy link
Contributor

now that should do yes

@mnearents
Copy link
Author

Yes, that seems to have fixed the issue. Thanks.

@yonahforst
Copy link

@lususvir sanitize yer logs

@mnearents
Copy link
Author

I was pretty sure I removed my keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

4 participants