LinkSocialAccountDTO
Package: @nauth-toolkit/core
Type: DTO (Request)
Request DTO for linking a social account to the authenticated user. The user's identity is resolved from the JWT token — no userId field is required.
- NestJS
- Express
- Fastify
import { LinkSocialAccountDTO } from '@nauth-toolkit/nestjs';
import { LinkSocialAccountDTO } from '@nauth-toolkit/core';
import { LinkSocialAccountDTO } from '@nauth-toolkit/core';
Properties
| Property | Type | Required | Description |
|---|---|---|---|
provider | string | Yes | Social provider name (e.g., google, apple, facebook). Trimmed and lowercased. Max 50 chars. |
code | string | Yes | Authorization code from OAuth callback. Trimmed. Max 1000 chars. |
state | string | Yes | State parameter from OAuth callback (for CSRF validation). Trimmed. Max 500 chars. |
Example
{
"provider": "apple",
"code": "c123456...",
"state": "csrf-token-123"
}