Skip to content
Esc
navigateopen⌘Jpreview
Dashboard

Complete passwordless sign in/up

Finish sign in/up process with passwordless

POST/{apiBasePath}/{tenantId}/signinup/code/consume
Path parameters
apiBasePathstringrequired
Its value depends on the apiBasePath set by the user
tenantIdstring
The tenant against which the request is made. If left empty, the default tenant will be used.
Header parameters
ridstring
The passwordless recipe ID
Request body
application/json
One of:
object
preAuthSessionIdpreAuthSessionIdrequired
An identifier that used to identify the login attempt/device.
shouldTryLinkingWithSessionUserboolean
linkCodestringrequired
object
preAuthSessionIdpreAuthSessionIdrequired
An identifier that used to identify the login attempt/device.
shouldTryLinkingWithSessionUserboolean
deviceIddeviceIdrequired
This should be saved on the starting device to enable the manual code entry flow.
userInputCodestringrequired
Responses
200Signin/up a user
One of:
object
statusstatusOK
Success status indicator
Allowed:OK
createdNewRecipeUserboolean
useruser
User information
Show properties
iduserId
Unique identifier for a user
timeJoinednumber
Timestamp when user joined
isPrimaryUserboolean
Whether this is the primary user account
tenantIdsstring[]
List of tenant IDs the user belongs to
emailsstring[]
List of user's email addresses
phoneNumbersstring[]
List of user's phone numbers
thirdPartyobject[]
List of third party accounts
Show properties
Array of object
idstring
Third party provider ID
userIdstring
User ID in the third party system
loginMethodsobject[]
List of login methods available to the user
Show properties
Array of object
recipeIdstring
The recipe ID for this login method
Allowed:emailpasswordthirdpartypasswordless
recipeUserIduserId
Unique identifier for a user
verifiedboolean
Whether this login method is verified
tenantIdsstring[]
List of tenant IDs for this login method
timeJoinednumber
Timestamp when this login method was added
emailstring
Email address for this login method
phoneNumberstring
Phone number for this login method
thirdPartyobject
Third party information for this login method
Show properties
idstring
Third party provider ID
userIdstring
User ID in the third party system
object
statusstring
Allowed:INCORRECT_USER_INPUT_CODE_ERROREXPIRED_USER_INPUT_CODE_ERROR
failedCodeInputAttemptCountnumber
maximumCodeInputAttemptsnumber
object
statusstring
Allowed:RESTART_FLOW_ERROR
object
statusstring
Allowed:SIGN_IN_UP_NOT_ALLOWED
reasonstring
generalErrorResponse
statusstring
Error status code
Allowed:GENERAL_ERROR
messagestring
Error message
403A claim validation error happened during factor setup
One of:
object
messagestring
Error message
claimValidationErrorsobject[]
List of claim validation errors
Show properties
Array of object
idstring
The claim ID
reasonobject
The reason for the validation error
object
messagestring
Error message
claimValidationErrorsobject[]
List of claim validation errors
Show properties
Array of object
idstring
The claim ID
reasonstring
The reason for the validation error
404Resource not found error
string
500Internal server error
string
Try it
Server
Parameters
Bodyapplication/json
Request
curl -X POST "/auth/public/signinup/code/consume" \
  -H "Content-Type: application/json" \
  -d '{
  "preAuthSessionId": "kFmkPQEAJtACiT2w/K8fndEuNm+XozJXSZSlWEr+iGs=",
  "shouldTryLinkingWithSessionUser": false,
  "linkCode": "b10lbT_SnDC4flA6Fn7pE5TtG5k5NfigLef4QMBeGA8"
}'
Response
{
  "status": "OK",
  "createdNewRecipeUser": true,
  "user": {
    "id": "fa7a0841-b533-4478-95533-0fde890c3483",
    "timeJoined": 1638433545183,
    "isPrimaryUser": true,
    "tenantIds": [
      "public"
    ],
    "emails": [
      "johndoe@gmail.com"
    ],
    "phoneNumbers": [
      36201234123
    ],
    "thirdParty": [
      {
        "id": "google",
        "userId": "rq238mrq2389rvq123213"
      }
    ],
    "loginMethods": [
      {
        "recipeId": "emailpassword",
        "recipeUserId": "fa7a0841-b533-4478-95533-0fde890c3483",
        "verified": true,
        "tenantIds": [
          "public"
        ],
        "timeJoined": 1638433545183,
        "email": "johndoe@gmail.com",
        "phoneNumber": 36201234123,
        "thirdParty": {
          "id": "google",
          "userId": "rq238mrq2389rvq123213"
        }
      }
    ]
  }
}

API reference

API schema and response details