🔐 IPDrift Authentication API

Serverless authentication and billing service for IPDrift

Note: This is the backend API for IPDrift. For the main application, visit the frontend URL.

Available Endpoints

POST
/.netlify/functions/auth/google

Google OAuth authentication

Body: {"token": "google-access-token"}

POST
/.netlify/functions/auth/verify

Verify JWT token

Body: {"token": "jwt-token"}

GET
/.netlify/functions/auth/profile

Get user profile

Headers: Authorization: Bearer jwt-token

GET
/.netlify/functions/auth/usage

Get usage statistics

Headers: Authorization: Bearer jwt-token

POST
/.netlify/functions/auth/refresh-key

Refresh API key

Headers: Authorization: Bearer jwt-token

Payment Endpoints

GET
/.netlify/functions/payment/plans

Get available subscription plans

POST
/.netlify/functions/payment/create-checkout

Create PayPal checkout session

Headers: Authorization: Bearer jwt-token

Body: {"plan_id": "pro"}

POST
/.netlify/functions/payment/create-portal

Create PayPal customer portal session

Headers: Authorization: Bearer jwt-token

Environment Status

✅ MongoDB: Configured

✅ JWT: Configured

✅ PayPal: Configured

✅ CORS: Enabled

Development: For local development, run netlify dev in the project directory.