<a id="coinbase"></a>

# Coinbase

<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                                     |
|----------------|------------------------------------------------|
| `coinbase`     | `social_core.backends.coinbase.CoinbaseOAuth2` |

Coinbase uses OAuth2.

- Register an application at [Coinbase](https://coinbase.com/oauth/applications/new)
- Fill in the **Client Id** and **Client Secret** values in your settings:
  ```default
  SOCIAL_AUTH_COINBASE_KEY = ''
  SOCIAL_AUTH_COINBASE_SECRET = ''
  ```
- Set the `redirect_url` on coinbase. Make sure to include the trailing
  slash, eg. `http://hostname/complete/coinbase/`
- Specify scopes with:
  ```default
  SOCIAL_AUTH_COINBASE_SCOPE = [...]
  ```

  By default the scope is set to `balance`.
- extra scopes can be defined by using:
  ```default
  SOCIAL_AUTH_COINBASE_AUTH_EXTRA_ARGUMENTS = {'account': 'all'}
  ```
