Authentication
  • Sprintfy
  • Core Functionality
  • Authentication

Overview

Sprintfy provides a complete authentication system out of the box. All authentication APIs are production-ready and secured by default.

Authentication supports multiple registration and login methods, including email, phone number, username, and social media providers.

Important: Every authentication API requires a unique project identifier to be passed in the request headers.

{
  "spfhash": "YOUR_API_HASH"
}

The spfhash value is unique per API and can be found in the API documentation inside the CMS.

Register Using Email & Password

This API allows users to register using their email address and password.

{
  "first_name": "required",
  "last_name": "required",
  "email": "required",
  "phone": "optional",
  "phone_prefix": "optional (example: +1, +971)",
  "place_slug": "optional (example: united-states)",
  "password": "required",
  "password_confirmation": "required"
}

Register Using Phone & Password

This API allows users to register using their phone number and password.

{
  "first_name": "required",
  "last_name": "required",
  "email": "optional",
  "phone": "required",
  "phone_prefix": "required (example: +1, +971)",
  "place_slug": "optional (example: united-states)",
  "password": "required",
  "password_confirmation": "required"
}

Register Using Username & Password

This API allows users to register using a unique username and password.

{
  "first_name": "required",
  "last_name": "required",
  "email": "optional",
  "phone": "optional",
  "phone_prefix": "optional",
  "place_slug": "optional (example: united-states)",
  "username": "required (no spaces or special characters)",
  "password": "required",
  "password_confirmation": "required"
}

Register Using Social Media Provider

This API allows users to register using a supported social media provider.

{
  "first_name": "required",
  "last_name": "required",
  "email": "required",
  "phone": "optional",
  "phone_prefix": "optional",
  "place_slug": "optional (example: united-states)",
  "social_media_provider": {
    "provider_slug": "required (google, facebook, apple)",
    "provider_user_id": "required",
    "provider_token": "optional"
  }
}

Login

Sprintfy supports login using:

  • Email & password
  • Phone number & password
  • Username & password
  • Social media provider

Login responses return access and refresh tokens used for authenticated requests.

Forgot Password

This API initiates a password reset process using email, phone, or username.

{
  "email": "required if phone and username are null",
  "phone": "required if email and username are null",
  "phone_prefix": "required if phone is used",
  "username": "required if email and phone are null"
}

Check Reset OTP

This API validates the OTP sent to the user before resetting the password.

Reset Password

This API resets the user's password using a valid OTP and identifier.

Logout

This API revokes the user's access and refresh tokens, logging the user out from the system.