Skip to content

Commit

Permalink
Add Seznam backend
Browse files Browse the repository at this point in the history
  • Loading branch information
nightshiba authored and nijel committed Jan 6, 2023
1 parent 02b0c7d commit 8b2688f
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased](https://github.com/python-social-auth/social-docs/commits/master)

### Added
- Added Seznam OAuth2 backend documentation.
- Added Grafana OAuth2 backend documentation.
- Added note on using extra auth arguments in Coinbase backend.
- Added note on using tenants in Azure AD backend.
Expand Down
1 change: 1 addition & 0 deletions docs/backends/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Social backends
reddit
runkeeper
salesforce
seznam
shimmering
shopify
simplelogin
Expand Down
38 changes: 38 additions & 0 deletions docs/backends/seznam.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Seznam
=========

Seznam supports OAuth2 for developers to authenticate users for their apps.
The documentation for the API can be found at `Seznam OAuth documentation`_.
This backend also provides additional configuration options to support
slightly different enterprise versions.

1. Register a new application at `Application management`_, set the
``redirect_uri`` to ``http://example.com/complete/seznam-oauth2/``,
replacing ``example.com`` with your domain.

2. Fill ``client_id`` and ``client_secret`` values in the settings::

SOCIAL_AUTH_SEZNAM_OAUTH2_KEY = '<client_id>'
SOCIAL_AUTH_SEZNAM_OAUTH2_SECRET = '<client_secret>'

- If you would like to access some additional information from the user,
you can set the ``SOCIAL_AUTH_SEZNAM_OAUTH2_SCOPE`` setting to a list
of extra scopes that are supported according to the `scope documentation`_.
For example, to request access to the user's phone number and avatar::
SOCIAL_AUTH_SEZNAM_OAUTH2_SCOPE = ['contact-phone', 'avatar']

User ID
-------

Seznam recommends the use of ``oauth_user_id`` as the user identifier instead
of some immutable data as ``username`` or ``email`` because
it can impose security risks if the user changes it.
For that reason ``oauth_user_id`` is used by default, but for compatibility
with the enterprise backed version, you can override this behavior by setting::

SOCIAL_AUTH_SEZNAM_OAUTH2_ID_KEY = 'id'

.. _Seznam OAuth documentation: https://vyvojari.seznam.cz/oauth/doc?lang=en
.. _Application management: https://vyvojari.seznam.cz/oauth/admin
.. _scope documentation: https://vyvojari.seznam.cz/oauth/scopes?lang=en

0 comments on commit 8b2688f

Please sign in to comment.