أمثلة
أمثلة حية لكل من الشركات والمطورين
للجميع
Zero-Type Login (No Number Required)
Fastest login UX: WhatsApp/Telegram buttons directly with no phone input field. System auto-captures the number from the message.
prompt.txt
You are a coding assistant specialized in Next.js and Tailwind CSS. Build a complete login page for ReOTP using Zero-Type Auth (no phone number input).
### Step 1: Setup & Connection
First, ensure the platform is connected. Ask the user to create a ReOTP account, get the REOTP_API_KEY, and add it to .env.local. If already connected, skip this step.
### Step 2: Requirements:
1. /login page with layout.tsx + page.tsx.
2. Large WhatsApp, Telegram (and Passkey as secondary) login buttons.
3. On WhatsApp click: call POST /api/verify/init WITHOUT phoneNumber (method PREDICTIVE).
4. Redirect instantly via window.location.href = waDeepLink (no spinner) and provide a fallback button for waLink.
5. Poll /api/verify/status?id=<requestId> every 2s until VERIFIED.
6. On success: store JWT in localStorage + router.push('/dashboard').
7. UI Design: Apple UI Liquid Glass — dark background, glassmorphism cards blur-xl, white/15 borders, Cairo font, cyan + emerald accents.
### Security:
- Add client-side cooldown on login button (10s).
- Validate JWT before storing.
- Use .env.local for NEXT_PUBLIC_API_URL.