Create a user with password credentials
curl --request POST \
--url https://api.acornops.dev/api/v1/auth/password/signup \
--header 'Content-Type: application/json' \
--header 'x-csrf-token: <x-csrf-token>' \
--data '
{
"email": "dev@acornops.local",
"username": "dev",
"password": "dev-password-12345",
"displayName": "Dev User"
}
'const options = {
method: 'POST',
headers: {'x-csrf-token': '<x-csrf-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'dev@acornops.local',
username: 'dev',
password: 'dev-password-12345',
displayName: 'Dev User'
})
};
fetch('https://api.acornops.dev/api/v1/auth/password/signup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"displayName": "<string>",
"emailVerified": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"status": "authenticated",
"verificationRequired": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Auth and users
Create a user with password credentials
Create a user with password credentials
curl --request POST \
--url https://api.acornops.dev/api/v1/auth/password/signup \
--header 'Content-Type: application/json' \
--header 'x-csrf-token: <x-csrf-token>' \
--data '
{
"email": "dev@acornops.local",
"username": "dev",
"password": "dev-password-12345",
"displayName": "Dev User"
}
'const options = {
method: 'POST',
headers: {'x-csrf-token': '<x-csrf-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'dev@acornops.local',
username: 'dev',
password: 'dev-password-12345',
displayName: 'Dev User'
})
};
fetch('https://api.acornops.dev/api/v1/auth/password/signup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"displayName": "<string>",
"emailVerified": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"status": "authenticated",
"verificationRequired": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Headers
CSRF token returned by /api/v1/auth/csrf and mirrored in the CSRF cookie.
Body
application/json