Skip to content

Commit

Permalink
docs: Added Etsy OAuth2 Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
amitray007 authored and nijel committed Jan 12, 2024
1 parent 3f6a1a1 commit dd260db
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Added Twitter API v2 backend documentation
- Added "OAuth2 with PKCE" instructions under "Adding a new backend"
- Added Bitbucket Data Center OAuth2 backend documentation
- Added Etsy OAuth2 backend documentation

### Changed
- Update partial-pipeline docs with the new storage solution details.
Expand Down
46 changes: 46 additions & 0 deletions docs/backends/etsy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Etsy OAuth2
=============================

Etsy supports the `OAuth 2.0`_ protocol using Authorization code with `Proof Key for Code Exchange (PKCE)`_ flow.

Configuration
--------------

1. Register a new `Application Link`_ in your Etsy Account.

2. Fill *Client ID* in ``SOCIAL_AUTH_ETSY_OAUTH2_KEY`` in your project settings::

SOCIAL_AUTH_ETSY_OAUTH2_KEY = "..."

Note: *Client Secret* isn't required via this flow.

3. Enable the backend::

SOCIAL_AUTH_AUTHENTICATION_BACKENDS = (
...
"social_core.backends.etsy.EtsyOAuth2",
...
)

Extra Configuration
--------------------

- You can specify the scope that your application requires::

SOCIAL_AUTH_ETSY_OAUTH2_SCOPE = ["shops_r", "shops_w", ...]

You can see all possible values at `Etsy OAuth 2.0 provider API Scopes`_.

- You can specify PKCE challenge method::

SOCIAL_AUTH_ETSY_OAUTH2_PKCE_CODE_CHALLENGE_METHOD = '...'

The possible value for this is only ``S256`` which is set by default.

You can see more information about PKCE at `RFC7636`_.

.. _OAuth 2.0: https://developer.etsy.com/documentation/essentials/authentication
.. _Application Link: https://developer.etsy.com/documentation/#developing-a-new-open-api-app
.. _Proof Key for Code Exchange (PKCE): https://datatracker.ietf.org/doc/html/rfc7636
.. _RFC7636: https://datatracker.ietf.org/doc/html/rfc7636
.. _Etsy OAuth 2.0 provider API Scopes: https://developer.etsy.com/documentation/essentials/authentication/#scopes
1 change: 1 addition & 0 deletions docs/backends/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Social backends
drip
dropbox
edmodo
etsy
eventbrite
eveonline
evernote
Expand Down
2 changes: 2 additions & 0 deletions docs/thanks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ let me know and I'll update the list):
* aspcanada_
* browniebroke_
* eshaan7_
* amitray007_


.. _python-social-auth: https://github.com/python-social-auth
Expand Down Expand Up @@ -219,3 +220,4 @@ let me know and I'll update the list):
.. _aspcanada: https://github.com/aspcanada
.. _browniebroke: https://github.com/browniebroke
.. _eshaan7: https://github.com/eshaan7
.. _amitray007: https://github.com/amitray007

0 comments on commit dd260db

Please sign in to comment.