-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Adding GameCenter auth #4946
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
Adding GameCenter auth #4946
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess these need fixing...
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this should be on the line above?
src/Adapters/Auth/gcenter.js
Outdated
}; | ||
|
||
return verify(identity, function (err, token) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this...
src/Adapters/Auth/gcenter.js
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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...