Debian Codegraph @

docs/socialaccount/providers/battlenet.rst

raw
1 Battle.net
2 ----------
3
4 The Battle.net OAuth2 authentication documentation
5 https://develop.battle.net/documentation/guides/using-oauth
6
7 Register your app here (Blizzard account required)
8 https://develop.battle.net/access/clients/create
9
10 Development callback URL
11 https://localhost:8000/accounts/battlenet/login/callback/
12
13 Note that in order to use battletags as usernames, you are expected to override
14 either the ``username`` field on your User model, or to pass a custom validator
15 which will accept the ``#`` character using the ``ACCOUNT_USERNAME_VALIDATORS``
16 setting. Such a validator is available in
17 ``socialaccount.providers.battlenet.validators.BattletagUsernameValidator``.
18
19 The following Battle.net settings are available:
20
21 .. code-block:: python
22
23 SOCIALACCOUNT_PROVIDERS = {
24 'battlenet': {
25 'SCOPE': ['wow.profile', 'sc2.profile'],
26 'REGION': 'us',
27 }
28 }
29
30 SCOPE:
31 Scope can be an array of the following options: ``wow.profile`` allows
32 access to the user's World of Warcraft characters. ``sc2.profile`` allows
33 access to the user's StarCraft 2 profile. The default setting is ``[]``.
34
35 REGION:
36 Either ``apac``, ``cn``, ``eu``, ``kr``, ``sea``, ``tw`` or ``us``
37
38 Sets the default region to use, can be overridden using query parameters
39 in the URL, for example: ``?region=eu``. Defaults to ``us``.