pajaydev / ebay-node-api

eBay API Client for node
https://pajaydev.github.io/ebay-node-api
MIT License
131 stars 76 forks source link

Deploy full oauth functionality #99

Closed TotallyNotChase closed 4 years ago

TotallyNotChase commented 4 years ago

Goal of the pull request:

Description

Sets up oauth for both application access tokens (client credentials) and user access tokens (authorization grant). Closes #93

Changelog

Note: This kind of makes this.options.body.grant_type useless, because each grant type has its own function but this will not break front end user functionality. In time, I suggest the options.body be completely removed and the scopes be passed in to their respective token getters as a parameter, hence achieving Single Responsibility Principle.

Things to keep in mind during dev

TotallyNotChase commented 4 years ago

@pajaydev did you get a chance at reviewing the changes?

pajaydev commented 4 years ago

@TotallyNotChase Sorry for the delay, I was caught up with some other work. I gave a small comment, kindly let me know if you are busy I will merge this and do it as part of cleanup. Thanks again for your patience 👍

TotallyNotChase commented 4 years ago

@pajaydev The changes are now migrated to src/credentials.js

TotallyNotChase commented 4 years ago

@pajaydev sounds good! thanks!

emporioreale commented 2 years ago

How to properly use that feature? Please post the working code to get an user access token by a refresh token. The demo code can't work because the refresh token parameter of the getUserTokenByRefresh method is missing.