<a id="untappd"></a>

# Untappd

<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                                   |
|----------------|----------------------------------------------|
| `untappd`      | `social_core.backends.untappd.UntappdOAuth2` |

Untappd uses OAuth v2 for Authentication, check the [official docs](https://untappd.com/api/docs).

- Create an app by filling out the form here: [Add App](https://untappd.com/api/register?register=new)
- Apps are approved on a one-by-one basis, so you’ll need to wait a
  few days to get your client ID and secret.
- Fill `Client ID` and `Client Secret` values in the settings:
  ```default
  SOCIAL_AUTH_UNTAPPD_KEY = '<App UID>'
  SOCIAL_AUTH_UNTAPPD_SECRET = '<App secret>'
  ```
- Optionally include a `User Agent` to identify your calls to Untappd (this
  may become required in the future):
  ```default
  SOCIAL_AUTH_UNTAPPD_USER_AGENT = 'My Custom User Agent or App Name'
  ```
- Add the backend to the `AUTHENTICATION_BACKENDS` setting:
  ```default
  AUTHENTICATION_BACKENDS = (
      ...
      'social_core.backends.untappd.UntappdOAuth2',
      ...
  )
  ```
- Then you can start authentication from your templates with a POST form:
  ```default
  <form method="post" action="{% url 'social:begin' 'untappd' %}">
      {% csrf_token %}
      <button type="submit">Sign in with Untappd</button>
  </form>
  ```
