> For the complete documentation index, see [llms.txt](https://docs.spurtcommerce.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spurtcommerce.com/api-reference/store/authentication/oauth-authentication.md).

# OAuth Authentication

Authenticate customers through supported OAuth providers.

## Authenticate with a supported OAuth provider.

> Authenticate with a supported OAuth provider.\
> \
> \*\*Authentication:\*\* Public; tenant validation applies.\
> \
> \*\*Feature area:\*\* Authentication\
> \
> \*\*Implementation source:\*\* \`src/api/store/controllers/CustomerController.ts\`\
> \
> \*\*Request example provenance:\*\* Request field names are source-defined; response uses the customer login envelope as an illustrative example.\
> \
> \*\*Response example provenance:\*\* Request field names are source-defined; response uses the customer login envelope as an illustrative example.\
> \
> \> \*\*Example status: Illustrative.\*\* The example is included to demonstrate request/response shape in the reference UI; verify the owning controller and request DTO before using it as a contract.

```json
{"openapi":"3.0.3","info":{"title":"SpurtCommerce Store API","version":"6.0.0"},"tags":[{"name":"OAuth authentication","description":"Authenticate customers through supported OAuth providers."}],"servers":[{"url":"https://api.example.com","description":"Replace with your SpurtCommerce API host. Paths include the /api prefix."}],"paths":{"/api/customer/Oauth-login":{"post":{"operationId":"postApiCustomerOauthLogin","summary":"Authenticate with a supported OAuth provider.","description":"Authenticate with a supported OAuth provider.\n\n**Authentication:** Public; tenant validation applies.\n\n**Feature area:** Authentication\n\n**Implementation source:** `src/api/store/controllers/CustomerController.ts`\n\n**Request example provenance:** Request field names are source-defined; response uses the customer login envelope as an illustrative example.\n\n**Response example provenance:** Request field names are source-defined; response uses the customer login envelope as an illustrative example.\n\n> **Example status: Illustrative.** The example is included to demonstrate request/response shape in the reference UI; verify the owning controller and request DTO before using it as a contract.","tags":["OAuth authentication"],"responses":{"200":{"description":"Successful response. Request field names are source-defined; response uses the customer login envelope as an illustrative example. Example is illustrative and does not guarantee a stable response contract.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","properties":{"token":{"type":"string","writeOnly":true},"user":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}},"additionalProperties":true}}}}},"requestBody":{"required":false,"description":"Sample request body. Request field names are source-defined; response uses the customer login envelope as an illustrative example. Treat this as an illustrative example, not a complete DTO contract.","content":{"application/json":{"schema":{"type":"object","properties":{"emailId":{"type":"string"},"source":{"type":"string"},"oauthData":{"type":"string"}},"additionalProperties":true}}}}}}}}
```
