Adding GameCenter auth#4946
Adding GameCenter auth#4946njt1982 wants to merge 4 commits intoparse-community:masterfrom njt1982:gcenter
Conversation
src/Adapters/Auth/gcenter.js
Outdated
| // Returns a promise that fulfills if this user id is valid. | ||
| function validateAuthData(authData) { | ||
| return new Promise(function (resolve, reject) | ||
| { |
There was a problem hiding this comment.
I guess this should be on the line above?
src/Adapters/Auth/gcenter.js
Outdated
| }; | ||
|
|
||
| return verify(identity, function (err, token) | ||
| { |
| return verify(identity, function (err, token) | ||
| { | ||
| if(err) | ||
| return reject('Failed to validate this access token with Game Center.'); |
There was a problem hiding this comment.
Is there a coding standard about if/else statements like this?
Codecov Report
@@ Coverage Diff @@
## master #4946 +/- ##
=========================================
- Coverage 94.24% 92.5% -1.74%
=========================================
Files 121 120 -1
Lines 8820 8913 +93
=========================================
- Hits 8312 8245 -67
- Misses 508 668 +160
Continue to review full report at Codecov.
|
We should probably test it before we merge it in. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Looks like a test needs fixing... |
| const authenticationHandler = authenticationLoader({ | ||
| gcenter: path.resolve('./src/Adapters/Auth/gcenter.js') | ||
| }); | ||
| validateAuthenticationHandler(authenticationHandler); |
There was a problem hiding this comment.
ReferenceError: validateAuthenticationHandler is not defined
This is causing tests to fail...
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is basically a copy and paste of just the GameCenter code from #4484 by @kenglou
I've not tested and I have no idea how to, but felt this was more "bite size" and likely to progress without 2 other auth's mixed in...