Authentication
Multi-Factor Authentication
Setup and manage MFA for enhanced security
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Setup and manage MFA for enhanced security
curl -X POST https://fucksornot.com/api/auth/mfa/setup \
-H "Cookie: auth-token=YOUR_JWT_TOKEN"
{
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...",
"secret": "JBSWY3DPEHPK3PXP",
"otpauthUrl": "otpauth://totp/FoN:user@example.com?secret=JBSWY3DPEHPK3PXP&issuer=FoN",
"backupCodes": [
"A1B2-C3D4-E5F6-A7B8",
"B2C3-D4E5-F6A7-B8C9",
"C3D4-E5F6-A7B8-C9D0",
"D4E5-F6A7-B8C9-D0E1",
"E5F6-A7B8-C9D0-E1F2",
"F6A7-B8C9-D0E1-F2A3",
"A7B8-C9D0-E1F2-A3B4",
"B8C9-D0E1-F2A3-B4C5",
"C9D0-E1F2-A3B4-C5D6",
"D0E1-F2A3-B4C5-D6E7"
]
}
| Field | Description |
|---|---|
qrCode | Base64 encoded QR code image to scan with authenticator app |
secret | TOTP secret for manual entry if QR scanning fails |
otpauthUrl | The otpauth:// URI used by authenticator apps to configure TOTP automatically |
backupCodes | One-time use codes for account recovery (10 codes, formatted as XXXX-XXXX-XXXX-XXXX) |
curl -X POST https://fucksornot.com/api/auth/mfa/verify \
-H "Cookie: auth-token=YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mfaCode": "123456"}'
{
"success": true
}
curl -X POST https://fucksornot.com/api/auth/mfa/disable \
-H "Cookie: auth-token=YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"password": "current_password",
"mfaCode": "123456"
}'
{
"success": true
}
| Status | Message | Cause |
|---|---|---|
400 | Password is required to disable MFA | The password field was omitted from the request body |
{
"action": "login",
"email": "user@example.com",
"password": "password",
"mfaCode": "123456"
}
{
"mfaRequired": true
}
{
"action": "login",
"email": "user@example.com",
"password": "password",
"mfaCode": "A1B2-C3D4-E5F6-A7B8"
}