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

remove assign authResponse in FB.init #728

Merged
merged 6 commits into from
Mar 16, 2019

Conversation

jsdevjournal
Copy link
Contributor

Base on this issue #726

I'm not sure what is the usage for newOptions.authResponse in this library. So I remove the line that assign authResponse to newOptions.

Anyone feel free to comment.

@codecov
Copy link

codecov bot commented Feb 6, 2019

Codecov Report

Merging #728 into master will increase coverage by 0.11%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #728      +/-   ##
==========================================
+ Coverage   88.85%   88.96%   +0.11%     
==========================================
  Files          53       53              
  Lines        4628     4622       -6     
  Branches     1070     1068       -2     
==========================================
  Hits         4112     4112              
+ Misses        516      510       -6
Impacted Files Coverage Δ
src/FacebookUtils.js 4.61% <0%> (+0.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6708261...d15def9. Read the comment docs.

@@ -58,8 +58,6 @@ const provider = {
newOptions[key] = initOptions[key];
}
}
newOptions.authResponse = authResponse;
Copy link

@schurch schurch Feb 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @durunvo. I am also seeing this issue. In Facebook's docs I can't see what passing this to FB.init would have been for, but maybe someone who knows more about this can explain why.

If you do remove this, perhaps there is no need for the whole authResponse object on line 50 and line 72 could be changed to existingResponse.userID !== authData.id?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FB.init require just 4 keys

{
  appId      : '{your-app-id}',
  status     : true,
  xfbml      : true,
  version    : 'v2.7' // or v2.6, v2.5, v2.4, v2.3
}

So yeah, I also think that it is not needed. But I want some explanation first just to make sure that this is a right thing to do.

But anyway I will push another commit according to your suggestion.

@Jauny
Copy link

Jauny commented Feb 12, 2019

thanks for doing this @durunvo. Who can help to get this pushed through? Our Facebook login is broken right now and it prevents us from pushing a new release to production.

edit: and for people stumbling here, @durunvo 's solution of changing the facebook script url from sdk.js to all.js fixed this for me too!

@dplewis dplewis requested a review from acinader March 15, 2019 23:45
@dplewis
Copy link
Member

dplewis commented Mar 15, 2019

@durunvo Thanks for the PR! I tried this in production and it works great.

I'm surprise by the all.js and sdk.js fix.

http://connect.facebook.net/en_US/sdk/debug.js
http://connect.facebook.net/en_US/all/debug.js

Both throw the authResponse is no supported error.

The FacebookUtils file doesn't have a single test case :(

@acinader acinader merged commit 13ec8ff into parse-community:master Mar 16, 2019
@jsdevjournal
Copy link
Contributor Author

Hey @dplewis, I can see you've merged my fork into master. Do you need help with anything else?

@dplewis
Copy link
Member

dplewis commented Mar 21, 2019

@durunvo We are going to do a Release for this SDK soon to include your fix.

The parse-server repo has a lot of PR that could use clean up / review if you want to help.

https://github.com/parse-community/parse-server/pulls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants