<a id="douban"></a>

# Douban

<a id="backend-class"></a>

## Backend class

For Django, add this class path to `AUTHENTICATION_BACKENDS`. For other
integrations, use the same class path in the framework-specific backend
setting.

| Backend name    | Class path                                 |
|-----------------|--------------------------------------------|
| `douban-oauth2` | `social_core.backends.douban.DoubanOAuth2` |

Douban supports OAuth2.

Recently Douban launched their OAuth2 support and the new developer site, you
can find documentation at [Douban Developers](http://developers.douban.com/). To setup OAuth2 follow:

- Register a new application at [Create A Douban App](http://developers.douban.com/apikey/apply), make sure to mark the
  **web application** checkbox.
- Fill **Consumer Key** and **Consumer Secret** values in settings:
  ```default
  SOCIAL_AUTH_DOUBAN_OAUTH2_KEY = ''
  SOCIAL_AUTH_DOUBAN_OAUTH2_SECRET = ''
  ```
- Add `'social_core.backends.douban.DoubanOAuth2'` into your
  `SOCIAL_AUTH_AUTHENTICATION_BACKENDS`.
