# Social Login

`POST /auth/login/social`

Completes the login process and provides the authenticated user with their authentication token.

{% hint style="info" %}

* Request headers required. See [Request Headers](https://docs-legacy.dfns.co/d/advanced-topics/authentication/request-headers) for more information.
  {% endhint %}

## Required Permissions

None

## Request body

|                                                              |          |                                                   |
| ------------------------------------------------------------ | -------- | ------------------------------------------------- |
| `orgId`                                                      | `String` | Dfns Organisation ID                              |
| `idToken` <mark style="color:red;">\*</mark>                 | `String` | idToken provided by an IDP such as Google         |
| `socialLoginProviderKind` <mark style="color:red;">\*</mark> | `String` | type of the idToken, for now only `Oidc` is valid |

### Example:

```json
{
  "idToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjY3MTk2NzgzNTFhNWZhZWRjMmU3MDI3NGJ...",
  "socialLoginProviderKind": "Oidc",
}
```

## Responses

{% hint style="info" %}

* See [Common Errors](https://github.com/dfns/dfns-api-docs/blob/m/getting-started/errors.md#common-errors) for common errors.
* See [User Login Errors](https://github.com/dfns/dfns-api-docs/blob/m/getting-started/errors.md#user-login-errors) for user login errors.
  {% endhint %}

{% tabs %}
{% tab title="200" %}
**Success** - a user authentication token

```json
{
  "token": "eyJ0eX...bzrQakA"
}
```

{% endtab %}
{% endtabs %}
