Confirm an MFA enrollment and continue the login
curl --request POST \
--url https://auth.sandbox.lerian.net/v1/login/mfa/confirm \
--header 'Content-Type: application/json' \
--data '
{
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"mfaType": "app",
"passcode": "******"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://auth.sandbox.lerian.net/v1/login/mfa/confirm"
payload := strings.NewReader("{\n \"mfaToken\": \"eyJhbGciOiJIUzI1NiJ9...\",\n \"mfaType\": \"app\",\n \"passcode\": \"******\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({mfaToken: 'eyJhbGciOiJIUzI1NiJ9...', mfaType: 'app', passcode: '******'})
};
fetch('https://auth.sandbox.lerian.net/v1/login/mfa/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://auth.sandbox.lerian.net/v1/login/mfa/confirm"
payload = {
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"mfaType": "app",
"passcode": "******"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"availableMethods": [
"app",
"email"
],
"mfaRequired": true,
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"preferredMethod": "app"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Confirm an MFA enrollment and continue the login
Confirms the factor started by setup with its first passcode, enables it, and continues the login with the normal MFA challenge under the SAME mfaToken. Wrong passcodes are charged to the same per-user attempt budget as verify (AUT-0018 at the cap). Public: authenticated by the enrollment-only mfaToken.
POST
/
v1
/
login
/
mfa
/
confirm
Confirm an MFA enrollment and continue the login
curl --request POST \
--url https://auth.sandbox.lerian.net/v1/login/mfa/confirm \
--header 'Content-Type: application/json' \
--data '
{
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"mfaType": "app",
"passcode": "******"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://auth.sandbox.lerian.net/v1/login/mfa/confirm"
payload := strings.NewReader("{\n \"mfaToken\": \"eyJhbGciOiJIUzI1NiJ9...\",\n \"mfaType\": \"app\",\n \"passcode\": \"******\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({mfaToken: 'eyJhbGciOiJIUzI1NiJ9...', mfaType: 'app', passcode: '******'})
};
fetch('https://auth.sandbox.lerian.net/v1/login/mfa/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://auth.sandbox.lerian.net/v1/login/mfa/confirm"
payload = {
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"mfaType": "app",
"passcode": "******"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"availableMethods": [
"app",
"email"
],
"mfaRequired": true,
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"preferredMethod": "app"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Cuerpo
application/json
The enrollment-only token of a 401 AUT-0019 refusal.
Ejemplo:
"eyJhbGciOiJIUzI1NiJ9..."
The factor set up.
Opciones disponibles:
app, email Ejemplo:
"app"
The one-time passcode (6 numeric digits) read off the new factor.
Ejemplo:
"******"
¿Esta página le ayudó?

