From a6edc6af5d3d1dd834a9f7a57139636fa7618d31 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Nov 2025 10:52:40 +0000 Subject: [PATCH 1/2] Initial plan From 1c0800a9e764aeb994a1c90dca306c930baf81ba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Nov 2025 11:00:09 +0000 Subject: [PATCH 2/2] Remove itembase backend documentation Co-authored-by: nijel <212189+nijel@users.noreply.github.com> --- docs/backends/index.rst | 1 - docs/backends/itembase.rst | 51 -------------------------------------- 2 files changed, 52 deletions(-) delete mode 100644 docs/backends/itembase.rst diff --git a/docs/backends/index.rst b/docs/backends/index.rst index f990e9f6..9e0b2200 100644 --- a/docs/backends/index.rst +++ b/docs/backends/index.rst @@ -100,7 +100,6 @@ Social backends google grafana instagram - itembase jawbone justgiving kakao diff --git a/docs/backends/itembase.rst b/docs/backends/itembase.rst deleted file mode 100644 index 3ef9a095..00000000 --- a/docs/backends/itembase.rst +++ /dev/null @@ -1,51 +0,0 @@ -Itembase -========= - -Itembase uses OAuth2 for authentication. - -- Register a new application for the `Itembase API`_, and - -- Add itembase live backend and/or sandbox backend to ``AUTHENTICATION_BACKENDS``:: - - AUTHENTICATION_BACKENDS = ( - ... - 'social_core.backends.itembase.ItembaseOAuth2', - 'social_core.backends.itembase.ItembaseOAuth2Sandbox', - ... - ) - -- fill ``Client Id`` and ``Client Secret`` values in the settings:: - - SOCIAL_AUTH_ITEMBASE_KEY = '' - SOCIAL_AUTH_ITEMBASE_SECRET = '' - - SOCIAL_AUTH_ITEMBASE_SANDBOX_KEY = '' - SOCIAL_AUTH_ITEMBASE_SANDBOX_SECRET = '' - - -- extra scopes can be defined by using:: - - SOCIAL_AUTH_ITEMBASE_SCOPE = ['connection.transaction', - 'connection.product', - 'connection.profile', - 'connection.buyer'] - SOCIAL_AUTH_ITEMBASE_SANDBOX_SCOPE = SOCIAL_AUTH_ITEMBASE_SCOPE - -To use data from the extra scopes, you need to do an extra activation step -that is not in the usual OAuth flow. For that you can extend your pipeline and -add a function that sends the user to an activation URL that Itembase provides. -The method to retrieve the activation data is included in the backend:: - - @partial - def activation(strategy, backend, response, *args, **kwargs): - if backend.name.startswith("itembase"): - - if strategy.session_pop('itembase_activation_in_progress'): - strategy.session_set('itembase_activated', True) - - if not strategy.session_get('itembase_activated'): - activation_data = backend.activation_data(response) - strategy.session_set('itembase_activation_in_progress', True) - return HttpResponseRedirect(activation_data['activation_url']) - -.. _Itembase API: http://developers.itembase.com/authentication/index