curl --request POST \
--url https://platform.trylath.com/auth/settings/set \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"methods": {
"emailCode": true,
"emailLink": true,
"smsCode": true,
"google": true,
"microsoft": true,
"github": true,
"passkey": true,
"password": true
},
"code": {
"length": 6,
"ttlSeconds": 930,
"maxAttempts": 6
},
"link": {
"ttlSeconds": 1830
},
"session": {
"accessTtlSeconds": 1950,
"refreshTtlSeconds": 15769800
},
"redirect": {
"allowedOrigins": [
"<string>"
]
},
"passkey": {
"rpId": "<string>",
"origins": [
"<string>"
]
},
"password": {
"minLength": 36,
"maxLength": 160,
"breachCheck": true
},
"mfa": {
"required": true
},
"signup": {
"allow": true
},
"botProtection": {
"enabled": true,
"blockDisposableEmail": true,
"blockedDomains": [
"<string>"
],
"signupPerIp": {
"max": 50,
"windowSeconds": 43230
},
"minChallengeAgeSeconds": 30
},
"rateLimits": {
"startPerIdentifier": {
"max": 50,
"windowSeconds": 43230
},
"startPerIp": {
"max": 50,
"windowSeconds": 43230
},
"completePerIp": {
"max": 50,
"windowSeconds": 43230
}
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
methods: {
emailCode: true,
emailLink: true,
smsCode: true,
google: true,
microsoft: true,
github: true,
passkey: true,
password: true
},
code: {length: 6, ttlSeconds: 930, maxAttempts: 6},
link: {ttlSeconds: 1830},
session: {accessTtlSeconds: 1950, refreshTtlSeconds: 15769800},
redirect: {allowedOrigins: ['<string>']},
passkey: {rpId: '<string>', origins: ['<string>']},
password: {minLength: 36, maxLength: 160, breachCheck: true},
mfa: {required: true},
signup: {allow: true},
botProtection: {
enabled: true,
blockDisposableEmail: true,
blockedDomains: ['<string>'],
signupPerIp: {max: 50, windowSeconds: 43230},
minChallengeAgeSeconds: 30
},
rateLimits: {
startPerIdentifier: {max: 50, windowSeconds: 43230},
startPerIp: {max: 50, windowSeconds: 43230},
completePerIp: {max: 50, windowSeconds: 43230}
}
})
};
fetch('https://platform.trylath.com/auth/settings/set', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://platform.trylath.com/auth/settings/set"
payload = {
"methods": {
"emailCode": True,
"emailLink": True,
"smsCode": True,
"google": True,
"microsoft": True,
"github": True,
"passkey": True,
"password": True
},
"code": {
"length": 6,
"ttlSeconds": 930,
"maxAttempts": 6
},
"link": { "ttlSeconds": 1830 },
"session": {
"accessTtlSeconds": 1950,
"refreshTtlSeconds": 15769800
},
"redirect": { "allowedOrigins": ["<string>"] },
"passkey": {
"rpId": "<string>",
"origins": ["<string>"]
},
"password": {
"minLength": 36,
"maxLength": 160,
"breachCheck": True
},
"mfa": { "required": True },
"signup": { "allow": True },
"botProtection": {
"enabled": True,
"blockDisposableEmail": True,
"blockedDomains": ["<string>"],
"signupPerIp": {
"max": 50,
"windowSeconds": 43230
},
"minChallengeAgeSeconds": 30
},
"rateLimits": {
"startPerIdentifier": {
"max": 50,
"windowSeconds": 43230
},
"startPerIp": {
"max": 50,
"windowSeconds": 43230
},
"completePerIp": {
"max": 50,
"windowSeconds": 43230
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.trylath.com/auth/settings/set"
payload := strings.NewReader("{\n \"methods\": {\n \"emailCode\": true,\n \"emailLink\": true,\n \"smsCode\": true,\n \"google\": true,\n \"microsoft\": true,\n \"github\": true,\n \"passkey\": true,\n \"password\": true\n },\n \"code\": {\n \"length\": 6,\n \"ttlSeconds\": 930,\n \"maxAttempts\": 6\n },\n \"link\": {\n \"ttlSeconds\": 1830\n },\n \"session\": {\n \"accessTtlSeconds\": 1950,\n \"refreshTtlSeconds\": 15769800\n },\n \"redirect\": {\n \"allowedOrigins\": [\n \"<string>\"\n ]\n },\n \"passkey\": {\n \"rpId\": \"<string>\",\n \"origins\": [\n \"<string>\"\n ]\n },\n \"password\": {\n \"minLength\": 36,\n \"maxLength\": 160,\n \"breachCheck\": true\n },\n \"mfa\": {\n \"required\": true\n },\n \"signup\": {\n \"allow\": true\n },\n \"botProtection\": {\n \"enabled\": true,\n \"blockDisposableEmail\": true,\n \"blockedDomains\": [\n \"<string>\"\n ],\n \"signupPerIp\": {\n \"max\": 50,\n \"windowSeconds\": 43230\n },\n \"minChallengeAgeSeconds\": 30\n },\n \"rateLimits\": {\n \"startPerIdentifier\": {\n \"max\": 50,\n \"windowSeconds\": 43230\n },\n \"startPerIp\": {\n \"max\": 50,\n \"windowSeconds\": 43230\n },\n \"completePerIp\": {\n \"max\": 50,\n \"windowSeconds\": 43230\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"activityId": "<string>",
"result": {
"settings": "<unknown>",
"customised": [
"<string>"
],
"updatedAt": "2023-11-07T05:31:56Z",
"defaults": "<unknown>",
"methods": {},
"public": "<unknown>"
}
}auth.settings.set
Changes sign-in settings for this environment. Objects merge key by key; redirect.allowedOrigins replaces the whole list. Takes effect on the next request. Ranges: code.length 4–8, code.ttlSeconds 60–1800, code.maxAttempts 3–10, link.ttlSeconds 60–3600, session.accessTtlSeconds 300–3600, session.refreshTtlSeconds 3600–31536000.
curl --request POST \
--url https://platform.trylath.com/auth/settings/set \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"methods": {
"emailCode": true,
"emailLink": true,
"smsCode": true,
"google": true,
"microsoft": true,
"github": true,
"passkey": true,
"password": true
},
"code": {
"length": 6,
"ttlSeconds": 930,
"maxAttempts": 6
},
"link": {
"ttlSeconds": 1830
},
"session": {
"accessTtlSeconds": 1950,
"refreshTtlSeconds": 15769800
},
"redirect": {
"allowedOrigins": [
"<string>"
]
},
"passkey": {
"rpId": "<string>",
"origins": [
"<string>"
]
},
"password": {
"minLength": 36,
"maxLength": 160,
"breachCheck": true
},
"mfa": {
"required": true
},
"signup": {
"allow": true
},
"botProtection": {
"enabled": true,
"blockDisposableEmail": true,
"blockedDomains": [
"<string>"
],
"signupPerIp": {
"max": 50,
"windowSeconds": 43230
},
"minChallengeAgeSeconds": 30
},
"rateLimits": {
"startPerIdentifier": {
"max": 50,
"windowSeconds": 43230
},
"startPerIp": {
"max": 50,
"windowSeconds": 43230
},
"completePerIp": {
"max": 50,
"windowSeconds": 43230
}
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
methods: {
emailCode: true,
emailLink: true,
smsCode: true,
google: true,
microsoft: true,
github: true,
passkey: true,
password: true
},
code: {length: 6, ttlSeconds: 930, maxAttempts: 6},
link: {ttlSeconds: 1830},
session: {accessTtlSeconds: 1950, refreshTtlSeconds: 15769800},
redirect: {allowedOrigins: ['<string>']},
passkey: {rpId: '<string>', origins: ['<string>']},
password: {minLength: 36, maxLength: 160, breachCheck: true},
mfa: {required: true},
signup: {allow: true},
botProtection: {
enabled: true,
blockDisposableEmail: true,
blockedDomains: ['<string>'],
signupPerIp: {max: 50, windowSeconds: 43230},
minChallengeAgeSeconds: 30
},
rateLimits: {
startPerIdentifier: {max: 50, windowSeconds: 43230},
startPerIp: {max: 50, windowSeconds: 43230},
completePerIp: {max: 50, windowSeconds: 43230}
}
})
};
fetch('https://platform.trylath.com/auth/settings/set', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://platform.trylath.com/auth/settings/set"
payload = {
"methods": {
"emailCode": True,
"emailLink": True,
"smsCode": True,
"google": True,
"microsoft": True,
"github": True,
"passkey": True,
"password": True
},
"code": {
"length": 6,
"ttlSeconds": 930,
"maxAttempts": 6
},
"link": { "ttlSeconds": 1830 },
"session": {
"accessTtlSeconds": 1950,
"refreshTtlSeconds": 15769800
},
"redirect": { "allowedOrigins": ["<string>"] },
"passkey": {
"rpId": "<string>",
"origins": ["<string>"]
},
"password": {
"minLength": 36,
"maxLength": 160,
"breachCheck": True
},
"mfa": { "required": True },
"signup": { "allow": True },
"botProtection": {
"enabled": True,
"blockDisposableEmail": True,
"blockedDomains": ["<string>"],
"signupPerIp": {
"max": 50,
"windowSeconds": 43230
},
"minChallengeAgeSeconds": 30
},
"rateLimits": {
"startPerIdentifier": {
"max": 50,
"windowSeconds": 43230
},
"startPerIp": {
"max": 50,
"windowSeconds": 43230
},
"completePerIp": {
"max": 50,
"windowSeconds": 43230
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.trylath.com/auth/settings/set"
payload := strings.NewReader("{\n \"methods\": {\n \"emailCode\": true,\n \"emailLink\": true,\n \"smsCode\": true,\n \"google\": true,\n \"microsoft\": true,\n \"github\": true,\n \"passkey\": true,\n \"password\": true\n },\n \"code\": {\n \"length\": 6,\n \"ttlSeconds\": 930,\n \"maxAttempts\": 6\n },\n \"link\": {\n \"ttlSeconds\": 1830\n },\n \"session\": {\n \"accessTtlSeconds\": 1950,\n \"refreshTtlSeconds\": 15769800\n },\n \"redirect\": {\n \"allowedOrigins\": [\n \"<string>\"\n ]\n },\n \"passkey\": {\n \"rpId\": \"<string>\",\n \"origins\": [\n \"<string>\"\n ]\n },\n \"password\": {\n \"minLength\": 36,\n \"maxLength\": 160,\n \"breachCheck\": true\n },\n \"mfa\": {\n \"required\": true\n },\n \"signup\": {\n \"allow\": true\n },\n \"botProtection\": {\n \"enabled\": true,\n \"blockDisposableEmail\": true,\n \"blockedDomains\": [\n \"<string>\"\n ],\n \"signupPerIp\": {\n \"max\": 50,\n \"windowSeconds\": 43230\n },\n \"minChallengeAgeSeconds\": 30\n },\n \"rateLimits\": {\n \"startPerIdentifier\": {\n \"max\": 50,\n \"windowSeconds\": 43230\n },\n \"startPerIp\": {\n \"max\": 50,\n \"windowSeconds\": 43230\n },\n \"completePerIp\": {\n \"max\": 50,\n \"windowSeconds\": 43230\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"activityId": "<string>",
"result": {
"settings": "<unknown>",
"customised": [
"<string>"
],
"updatedAt": "2023-11-07T05:31:56Z",
"defaults": "<unknown>",
"methods": {},
"public": "<unknown>"
}
}Authorizations
A Lath API key: lath_live_sk… or lath_test_sk… on a server, lath_live_pk… or lath_test_pk… in a browser.
Headers
Replays the stored response for the same key and input; refuses different input.
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

