<a id="nationbuilder"></a>

# NationBuilder

<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                                               |
|-----------------|----------------------------------------------------------|
| `nationbuilder` | `social_core.backends.nationbuilder.NationBuilderOAuth2` |

[NationBuilder supports OAuth2](http://nationbuilder.com/api_quickstart) as their authentication mechanism. Follow these
steps in order to use it:

- Register a new application at your [Nation Admin panel](https://psa.nationbuilder.com/admin/apps) (define the Callback
  URL to `http://example.com/complete/nationbuilder/` where `example.com`
  is your domain).
- Fill the `Client ID` and `Client Secret` values from the newly created
  application:
  ```default
  SOCIAL_AUTH_NATIONBUILDER_KEY = ''
  SOCIAL_AUTH_NATIONBUILDER_SECRET = ''
  ```
- Also define your NationBuilder slug:
  ```default
  SOCIAL_AUTH_NATIONBUILDER_SLUG = 'your-nationbuilder-slug'
  ```
- Enable the backend in `AUTHENTICATION_BACKENDS` setting:
  ```default
  AUTHENTICATION_BACKENDS = (
      ...
      'social_core.backends.nationbuilder.NationBuilderOAuth2'
      ...
  )
  ```
