Skip to main content
PUT
https://example.com
/
api
/
settings
/
auth
/
google
/
allowed-domains
Set Google allowed domains
curl --request PUT \
  --url https://example.com/api/settings/auth/google/allowed-domains \
  --header 'Content-Type: application/json' \
  --cookie better-auth.session_token= \
  --data '
{
  "allowedDomains": [
    "<string>"
  ]
}
'
{
  "error": {
    "code": "<string>",
    "message": "<string>",
    "requestId": "<string>",
    "statusCode": 123,
    "details": [
      {
        "message": "<string>",
        "path": "<string>"
      }
    ]
  }
}

Authorizations

better-auth.session_token
string
cookie
required

Body

application/json
allowedDomains
string[]
required
Minimum array length: 1
Pattern: ^[a-z0-9.-]+\.[a-z]{2,}$

Response

Allowed domains saved