-
Notifications
You must be signed in to change notification settings - Fork 0
Add routes to enable coinbase oauth functionality #101
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
base: master
Are you sure you want to change the base?
Conversation
npm-debug.log
Outdated
@@ -0,0 +1,48 @@ | |||
0 info it worked if it ends with ok |
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 think you should probably not add this file to the repo
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.
Good catch
common/models/account.js
Outdated
return cb(err) | ||
} | ||
|
||
redisClient.hmset('coinbase-credentials', { |
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.
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.
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.
Yeah, that makes a lot of sense
common/models/account.js
Outdated
return cb(err) | ||
} | ||
|
||
return redisClient.hgetall('coinbase-credentials', function (err, obj) { |
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 think you should use the temp_code as key to retreive user credentials
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.