Authentication

Start authentication

POST
/auth/start

Authorization

appId
headerx-app-id<token>

Your application ID. Required on app-tier and user-tier routes. Omitted on routes that authenticate with x-app-api-key only.

Request Body

application/json
  1. body
provider*string
Value in"google""twitter""apple""email""siwe""siws"
redirectUrl?string
Formaturi
email?string
Formatemail
Lengthlength <= 254
turnstileToken?string
earlyAccessCode?string

Response Body

200

application/json
  1. response
type*string
Value in"redirect""magic_link""nonce""challenge_required"
url?string
success?true
Value intrue
nonce?string
statement?string
siteKey?string
Example Request
curl -X POST 'https://api.t.sufwankhalid.com/auth/start' \  -H 'Content-Type: application/json' \  -d '{  "provider": "google"}'
Example Response
{  "type": "redirect",  "url": "string",  "success": true,  "nonce": "string",  "statement": "string",  "siteKey": "string"}