Skip to main content

Sign Up API

The signup endpoints allow new users to create accounts on the ProductFlo platform. Multiple registration methods are supported, including email, phone number, and OAuth providers.

Email Signup

POST /auth/signup

Create a new user account with email and password
Creates a new user account with email and password authentication.

Request

Request Body

string
The user’s first name
string
The user’s last name
string
The user’s full name (alternative to providing first_name and last_name separately)
string
required
The user’s username
string
required
The user’s email address
string
required
The user’s password
string
required
Confirmation of the password (must match password)

Response

object
User information
object
Session information if auto-login is enabled

Phone Signup

POST /auth/phone-signup

Create a new user account with phone number and password
Creates a new user account with phone number and password authentication.

Request

Request Body

string
required
The user’s username
string
required
The user’s phone number in international format (e.g., +12345678901)
string
required
The user’s password
string
required
Confirmation of the password (must match password)

Response

Similar to email signup response, with phone number instead of email.

OAuth Provider Signup

POST /auth/provider

Create or login with an OAuth provider
Initiates the OAuth flow with an external provider like Google, GitHub, etc.

Request

Request Body

string
required
The OAuth provider to use (e.g., google, github, apple)

Response

string
URL to redirect the user to for OAuth authentication

OAuth Callback

GET /auth/callback

Handle OAuth provider callback
This endpoint is called by the OAuth provider after the user authenticates. It completes the OAuth flow and creates or logs in the user.

Request

This endpoint is not typically called directly. The OAuth provider redirects to this URL with an authorization code.

Response

After successful authentication, the user is redirected to the application with an authenticated session.