Authenticate user with credentials
Changed onAuthenticate a user using the specified method and credentials. Requires a valid session token from /initAuth.
Credential Formats by Method:
- password: { "credentials": { "password": "your-password" } }
- otp: { "credentials": { "otp": "123456" } } (6-digit code, valid for 10 minutes)
- google: { "credentials": "google-id-token-string" }. The object form { "credentials": { "credential": "..." } } passes the first token check, but by code reading the second check is handed the whole object, so it ends in 500
- microsoft: { "credentials": { "idToken": "..." } } (only idToken is read)
SAML (samlSso), generic OAuth (oauth) and Azure AD (azureAd) sign-in were removed in 1.0; this endpoint answers 400 for them. Azure AD accounts sign in with microsoft.
Multi-Step Response:
If organization uses MFA, successful authentication returns:
- status: "success" with nextStep and allowedMethods for next step
Fully Authenticated Response:
After completing all steps:
- message: "Fully authenticated" with accessToken (1hr) and refreshToken (7d)
Security:
- Account locks for 24 hours after 10 consecutive failed attempts, and the owner is sent an email saying so. While it is locked, sign-in is refused with the same answer as a wrong password or code, even when the password or code is right
- CAPTCHA may be required if enabled (pass cf-turnstile-response)
- An email with no account gets the same status and message as a real account given a wrong password (400) or a wrong, missing or expired sign-in code (401)
- The session token is single-use for the final step: once tokens are returned the session is gone, and sending it again answers 401
Order of checks: the session token is checked before the body, so a request without a valid x-session-token answers 401 whatever its body holds.
Request
- Base URLhttps://app.pipeshub.com/api/v1
- URLhttps://app.pipeshub.com/api/v1/userAccount/authenticate
- Authnone required
Headers
Session token received from /initAuth endpoint
Request body
Example request
{
"credentials": {
"otp": "123456"
}
}Response
Authentication step successful or fully authenticated
Example response
{
"message": "Fully authenticated"
}Changes
- breaking
removed
subschema #4from therequest propertyoneOflist - breaking
added the pattern
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9-]*\.)+[A-Za-z]{2,}$to the request property - warning
the
request property's maxLength was set to254 - info
added
subschema #5to therequest propertyanyOflist - info
removed the non-success response with the status
- info
added the optional property
//////to the response with the status
- breaking
- breaking
removed the enum value
azureAdof the request property - breaking
removed the enum value
oauthof the request property - breaking
removed the enum value
samlSsoof the request property - warning
removed the optional property
/////from the response with the status - warning
removed the optional property
/////from the response with the status - warning
removed the optional property
/////from the response with the status
- breaking