Authentication Endpoints
Check the health status of the authentication service. This endpoint is used by load balancers, monitoring systems, and orchestration tools to determine if the service is healthy and ready to handle requests.
Response Status:
200 OK
: Service is healthy and all components are operational503 Service Unavailable
: Service is unhealthy (database connection failed)
Use Cases:
Load balancer health checks
Kubernetes liveness/readiness probes
Monitoring system status checks
CI/CD pipeline health verification
GET /v1/auth/health/ HTTP/1.1
Host: api.dev.fabricbloc.com
Accept: */*
{
"status": "text",
"timestamp": "text",
"service": "text",
"environment": "text",
"app_version": "text",
"components": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}
Authenticate user with email/phone and password to obtain access tokens
Authentication Flow:
User provides identifier (email/phone) and password
System validates credentials
Returns JWT access and refresh tokens
User can use access token for authenticated requests
Security Features:
Password hashing and validation
Account lockout after failed attempts
JWT token expiration
Refresh token for token renewal
Token Usage:
Access Token: Include in Authorization header for API calls
Refresh Token: Use to get new access token when expired
Prerequisites:
User account must be verified
Valid email/phone and password combination
Use Cases:
Web application user login
Mobile app authentication
API access for authenticated users
E-commerce platform customer login
Email or Phone number
Your password can’t be too similar to your other personal information.
Your password must contain at least 8 characters.
Your password can’t be a commonly used password.
Your password can’t be entirely numeric.
Login successful
Invalid credentials
Authentication failed
Too many login attempts
Internal server error
POST /v1/auth/login/basic/ HTTP/1.1
Host: api.dev.fabricbloc.com
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"identifier": "[email protected]",
"password": "MySecretPassword123"
}
{
"access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": 123,
"email": "[email protected]",
"is_verified": true
}
}
Initiate passwordless login by sending OTP or verification link
Process:
User provides email/phone number
System sends OTP or verification link
User enters OTP or clicks link
System authenticates user and returns tokens
Benefits:
No password required
Enhanced security through time-based codes
Reduced password management overhead
Security:
Rate limiting prevents abuse
OTP expiration for security
One-time use codes
Use Cases:
Password-free authentication for mobile apps
Quick login for returning users
Enhanced security for sensitive applications
Corporate SSO integration
Method to send message
email
- emailsms
- sms
email
email
- emailsms
- sms
OTP or Link
otp
- otplink
- link
otp
otp
- otplink
- link
Email or Phone number
Login OTP/link sent successfully
Invalid identifier or user not found
Rate limit exceeded
Internal server error
POST /v1/auth/login/passwordless/ HTTP/1.1
Host: api.dev.fabricbloc.com
Content-Type: application/json
Accept: */*
Content-Length: 76
{
"identifier": "[email protected]",
"method": "email",
"verification_type": "otp"
}
{
"message": "otp sent via email."
}
Complete passwordless login by verifying OTP or link
Process:
User provides identifier and verification code
System validates OTP/link
Authenticates user and returns JWT tokens
User can now access protected resources
Security:
OTP validation with expiration check
One-time use verification codes
Rate limiting on verification attempts
Use Cases:
Completing passwordless login flow
Two-factor authentication verification
Temporary access code validation
Guest user authentication
Email or Phone number
Verification code received
Login successful
Invalid verification code
Internal server error
POST /v1/auth/login/passwordless/confirm/ HTTP/1.1
Host: api.dev.fabricbloc.com
Content-Type: application/json
Accept: */*
Content-Length: 49
{
"identifier": "[email protected]",
"code": "123456"
}
{
"access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": 123,
"email": "[email protected]",
"is_verified": true
}
}
Authenticate user using Ethereum wallet signature verification
Process:
User provides wallet address, message, and signature
System verifies signature using Ethereum cryptography
Creates or retrieves user account
Returns JWT access and refresh tokens
Security Features:
Cryptographic signature verification
Nonce-based replay protection
Wallet address validation
Automatic user creation for new wallets
Message Format: The message to sign follows this format: Welcome to BlockAuth!
Please sign this message to authenticate with your wallet.
Wallet Address: {wallet_address} Nonce: {nonce} Timestamp: {timestamp}
This signature will be used to authenticate your account.
Prerequisites:
Valid Ethereum wallet address
Properly signed message with correct format
Valid signature that matches the wallet address
Use Cases:
DeFi application user authentication
NFT marketplace user access
Web3 gaming platform login
Decentralized application (dApp) login
Ethereum wallet address (0x...)
Message that was signed by the wallet user.
Ethereum signature (0x-prefixed, 130 hex chars, e.g. 0x1234...)
Wallet authentication successful
Invalid wallet data or signature
Authentication failed
Internal server error
POST /v1/auth/login/wallet/ HTTP/1.1
Host: api.dev.fabricbloc.com
Content-Type: application/json
Accept: */*
Content-Length: 471
{
"wallet_address": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
"message": "Welcome to BlockAuth!\n\nPlease sign this message to authenticate with your wallet.\n\nWallet Address: 0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6\nNonce: 1234567890\nTimestamp: 1640995200\n\nThis signature will be used to authenticate your account.",
"signature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b"
}
{
"access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Retrieve the complete profile information for the currently authenticated user. This endpoint requires a valid JWT access token in the Authorization header.
Authentication: Required (Bearer token)
Profile Information:
Basic user details (ID, email, name)
Account status (verification, online status)
Profile data (birth date, bio)
Authentication methods used
Account creation and last login timestamps
Use Cases:
Display user profile in frontend applications
Verify user authentication status
Retrieve user preferences and settings
Check account verification status
GET /v1/auth/me/ HTTP/1.1
Host: api.dev.fabricbloc.com
Authorization: Bearer JWT
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "[email protected]",
"first_name": "text",
"last_name": "text",
"date_joined": "2025-09-14T05:33:00.877Z",
"is_online": true,
"date_of_birth": "2025-09-14",
"bio": "text",
"authentication_type": "text",
"is_verified": true,
"wallet_address": "text"
}
Change password for authenticated user.
Process:
User provides old password, new password, and confirmation
System validates old password and password confirmation
Updates to new password
Invalidates all existing sessions
Security:
Requires old password verification
Password strength validation
Password confirmation matching
Session invalidation for security
Rate limiting on attempts
Authentication Required:
Valid JWT access token in Authorization header
Use Cases:
Proactive password security updates
Regular password rotation compliance
Account security enhancement
Password policy enforcement
Your password can’t be too similar to your other personal information.
Your password must contain at least 8 characters.
Your password can’t be a commonly used password.
Your password can’t be entirely numeric.
Your password can’t be too similar to your other personal information.
Your password must contain at least 8 characters.
Your password can’t be a commonly used password.
Your password can’t be entirely numeric.
Your password can’t be too similar to your other personal information.
Your password must contain at least 8 characters.
Your password can’t be a commonly used password.
Your password can’t be entirely numeric.
Password changed successfully
Invalid current password or weak new password
Authentication required
Rate limit exceeded
Internal server error
POST /v1/auth/password/change/ HTTP/1.1
Host: api.dev.fabricbloc.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 113
{
"old_password": "OldPassword123",
"new_password": "NewSecurePassword123",
"confirm_password": "NewSecurePassword123"
}
{
"message": "Password changed successfully."
}
Initiate password reset process by sending OTP or reset link
Process:
User provides email/phone number
System validates user exists
Sends OTP or reset link
User completes reset via separate endpoint
Security:
Rate limiting prevents abuse
No indication if user exists (security through obscurity)
Time-limited reset tokens
Use Cases:
User forgot password
Account compromise recovery
Password expiration notification
Security policy enforcement
Method to send message
email
- emailsms
- sms
email
email
- emailsms
- sms
OTP or Link
otp
- otplink
- link
otp
otp
- otplink
- link
Email or Phone number
Password reset initiated successfully
Invalid identifier
Rate limit exceeded
Internal server error
POST /v1/auth/password/reset/ HTTP/1.1
Host: api.dev.fabricbloc.com
Content-Type: application/json
Accept: */*
Content-Length: 76
{
"identifier": "[email protected]",
"method": "email",
"verification_type": "otp"
}
{
"message": "Password reset OTP sent via email."
}
Complete password reset by providing verification code, new password, and confirmation.
Process:
User provides identifier, verification code, new password, and confirmation
System validates code, password, and confirmation matching
Updates user password
Invalidates all existing sessions
Security:
Password strength validation
Password confirmation matching
Code expiration check
Session invalidation for security
Use Cases:
Completing forgotten password recovery
Account security restoration
Compromised account recovery
Password policy compliance
Email or Phone number
Verification code received
Your password can’t be too similar to your other personal information.
Your password must contain at least 8 characters.
Your password can’t be a commonly used password.
Your password can’t be entirely numeric.
Your password can’t be too similar to your other personal information.
Your password must contain at least 8 characters.
Your password can’t be a commonly used password.
Your password can’t be entirely numeric.
Password reset successful
Invalid code or weak password
Internal server error
POST /v1/auth/password/reset/confirm/ HTTP/1.1
Host: api.dev.fabricbloc.com
Content-Type: application/json
Accept: */*
Content-Length: 129
{
"identifier": "[email protected]",
"code": "123456",
"new_password": "NewSecurePassword123",
"confirm_password": "NewSecurePassword123"
}
{
"message": "Password reset successful."
}
Create a new user account with email/phone verification (Basic Signup).
Process:
User provides email/phone and password
System validates input data
Creates user account (unverified)
Sends OTP or verification link
User completes verification via separate endpoint
Verification Methods:
OTP: Time-based one-time password sent via email/SMS
Link: Verification link sent via email
Security:
Password is hashed using Django's secure hashing
Rate limiting applied to prevent abuse
Email/phone validation before account creation
Prerequisites:
Valid email address or phone number
Strong password (minimum 8 characters)
Unique identifier (email/phone not already registered)
Use Cases:
New user registration for web/mobile applications
Account creation for e-commerce platforms
User onboarding for SaaS applications
Community platform member registration
Method to send message
email
- emailsms
- sms
email
email
- emailsms
- sms
OTP or Link
otp
- otplink
- link
otp
otp
- otplink
- link
Email or Phone number
Your password can’t be too similar to your other personal information.
Your password must contain at least 8 characters.
Your password can’t be a commonly used password.
Your password can’t be entirely numeric.
Registration initiated successfully
Validation error - Invalid input data
Rate limit exceeded
Internal server error
POST /v1/auth/signup/ HTTP/1.1
Host: api.dev.fabricbloc.com
Content-Type: application/json
Accept: */*
Content-Length: 109
{
"identifier": "[email protected]",
"password": "MySecretPassword123",
"method": "email",
"verification_type": "otp"
}
{
"message": "otp sent via email."
}
Verify OTP or click verification link to complete user registration
Process:
User provides identifier and verification code
System validates OTP/link
Marks user as verified
User can now login to the system
Verification Types:
OTP: Numeric code sent via email/SMS
Link: URL-based verification (handled separately)
Security:
OTP has expiration time
One-time use only
Rate limiting on attempts
CSRF protection for link verification
Use Cases:
Completing email verification after signup
Phone number verification for SMS-based auth
Account activation after registration
Two-factor authentication setup
Email or Phone number
Verification code received
Registration confirmed successfully
Invalid verification code
Internal server error
POST /v1/auth/signup/confirm/ HTTP/1.1
Host: api.dev.fabricbloc.com
Content-Type: application/json
Accept: */*
Content-Length: 49
{
"identifier": "[email protected]",
"code": "123456"
}
{
"message": "Email verified successfully."
}
Resend OTP or verification link for signup confirmation or wallet email verification.
Use Cases:
User didn't receive initial verification
OTP expired and needs renewal
Wallet user adding email verification
Rate Limiting:
Prevents abuse and spam
Configurable wait time between requests
Different limits for signup vs wallet verification
Security:
Rate limiting prevents brute force attacks
Validates identifier format before sending
Logs all attempts for monitoring
Use Cases:
User didn't receive initial verification email/SMS
OTP expired and needs renewal
Wallet user adding email verification
Account recovery for unverified users
Method to send message
email
- emailsms
- sms
email
email
- emailsms
- sms
OTP or Link
otp
- otplink
- link
otp
otp
- otplink
- link
Email or Phone number
Verification OTP/link sent successfully
Validation error
Rate limit exceeded
Internal server error
POST /v1/auth/signup/otp/resend/ HTTP/1.1
Host: api.dev.fabricbloc.com
Content-Type: application/json
Accept: */*
Content-Length: 76
{
"identifier": "[email protected]",
"method": "email",
"verification_type": "otp"
}
{
"message": "otp sent via email."
}
Get a new access token using a valid refresh token
Process:
User provides valid refresh token
System validates refresh token
Returns new access and refresh tokens
Old refresh token becomes invalid
Security:
Refresh tokens have longer expiration
Token rotation for enhanced security
Automatic invalidation of old tokens
Use Cases:
Access token expired during active session
Regular token rotation for security
Session renewal for long-running applications
Mobile app background token refresh
Refresh token to get new access token
Token refreshed successfully
Invalid refresh token
Token expired or invalid
Internal server error
POST /v1/auth/token/refresh/ HTTP/1.1
Host: api.dev.fabricbloc.com
Content-Type: application/json
Accept: */*
Content-Length: 53
{
"refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
{
"access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Add an email address to a wallet-based user account and send verification
Process:
User provides email address
System validates email format
Updates user account with email
Sends verification OTP/link to email
User completes verification via separate endpoint
Benefits:
Enhanced account recovery options
Email notifications and updates
Additional verification layer
Better user experience
Security:
Email format validation
Rate limiting on requests
Verification required before email is active
Authentication required
Authentication Required:
Valid JWT access token in Authorization header
Use Cases:
Wallet user account enhancement
Account recovery setup for wallet users
Email notification preferences
Multi-factor authentication setup
Email address to add and verify
Type of verification to send (OTP or link)
otp
- otplink
- link
otp
otp
- otplink
- link
Email added and verification sent successfully
Invalid email or validation error
Authentication required
Rate limit exceeded
Internal server error
POST /v1/auth/wallet/email/add/ HTTP/1.1
Host: api.dev.fabricbloc.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 54
{
"email": "[email protected]",
"verification_type": "otp"
}
{
"message": "Email added successfully. otp sent via email."
}
Last updated
Was this helpful?