Add routes to enable coinbase oauth functionality#101
Open
thechinedu wants to merge 2 commits intomasterfrom
Open
Add routes to enable coinbase oauth functionality#101thechinedu wants to merge 2 commits intomasterfrom
thechinedu wants to merge 2 commits intomasterfrom
Conversation
samparsky
requested changes
Apr 30, 2018
npm-debug.log
Outdated
| @@ -0,0 +1,48 @@ | |||
| 0 info it worked if it ends with ok | |||
Contributor
There was a problem hiding this comment.
I think you should probably not add this file to the repo
common/models/account.js
Outdated
| return cb(err) | ||
| } | ||
|
|
||
| redisClient.hmset('coinbase-credentials', { |
Contributor
There was a problem hiding this comment.
Using 'coinbase-credentials' has key for hmset shouldn't be, as for every user the previous credentials would be overwritten.
According to redis docs
Sets the specified fields to their respective values in the hash stored at key. This command overwrites any specified fields already existing in the hash. If key does not exist, a new key holding a hash is created.
I think you should use the temp_code as key since its unique to each user.
Contributor
Author
There was a problem hiding this comment.
Yeah, that makes a lot of sense
common/models/account.js
Outdated
| return cb(err) | ||
| } | ||
|
|
||
| return redisClient.hgetall('coinbase-credentials', function (err, obj) { |
Contributor
There was a problem hiding this comment.
I think you should use the temp_code as key to retreive user credentials
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
It adds in backend support for coinbase oauth workflow on the mobile app
Note: There are some test env variables that need to be set in order for the oauth flow to work and this is available upon request.