feat(ebay): Starting work on eBay OAuth Provider
Submitting Pull Requests
General
- [ ] Make sure you use semantic commit messages.
Examples:
"fix(google): Fixed foobar bug","feat(accounts): Added foobar feature". - [x] All Python code must formatted using Black, and clean from pep8 and isort issues.
- [ ] JavaScript code should adhere to StandardJS.
- [ ] If your changes are significant, please update
ChangeLog.rst. - [ ] If your change is substantial, feel free to add yourself to
AUTHORS.
Provider Specifics
In case you add a new provider:
- [ ] Make sure unit tests are available.
- [x] Add an entry of your provider in
test_settings.py::INSTALLED_APPSanddocs/installation.rst::INSTALLED_APPS. - [x] Add documentation to
docs/providers/<provider name>.rstanddocs/providers/index.rstProvider Specifics toctree. - [ ] Add an entry to the list of supported providers over at
docs/overview.rst.
Hello,
EBay uses a two part authentication system. First, we need to get the user's consent (and specify scopes of the application), then we place the authorization code grant request to get a User access token and a refresh token. (I am following the docs here: https://developer.ebay.com/api-docs/static/oauth-consent-request.html, https://developer.ebay.com/api-docs/static/oauth-auth-code-grant-request.html.
Is it possible to support this? We would need to have a way to pass scopes. Would that be part of settings aswell?
Sorry for the questions!
Thanks!
Is it possible to support this? We would need to have a way to pass scopes. Would that be part of settings aswell?
What you describe is regular OAuth2 functionality -- the other providers do similar things. I suggest you have a look at the OAuth2Provider class, specifically the get_scope() method. As you can see there, there is already a uniform way in which providers get ahold of the scopes, so this is not something you need a custom implementation for.
I implemented some of the changes discussed. I wrote some tests (probably more than necessary), but I am not too sure how to test it