Skip to main content
Source snapshot: 13 October 2026. These pages describe the current implementation, including unfinished controls. See coverage and review notes.

Member OTP login

Host: [tenant].<ROOT_DOMAIN> · Route: /login

Purpose and access

Authenticate a citizen member using the mobile number registered with this Mahallu.Entry, public access, and redirect rules are described for this screen below.

Screen layout

Sign In via Phone & OTP shows the phone-entry step, then a six-digit-code step with Verify and log in, resend cooldown, and Use a different number. A link returns to the public homepage.

Fields and displayed information

Fields and filters: Member otp login form

Actions

Linked navigation

Interaction sequence

Enter phone → Send code → request tenant-scoped OTP → enter code → Verify and log in → verify OTP and navigate to the safe destination. Use a different number resets the code step; resend follows its cooldown.

States and rules

The page recognizes inactivity/expired notices and sanitizes returnTo/redirect. An existing member session redirects to dashboard by default. No SMS provider is wired up: OTP codes are logged server-side for development. Codes expire after five minutes, allow five failed attempts, and are consumed once. The request response does not reveal whether the number is registered.The rendered action controls bind loading indicators to pending state. Failed API saves keep their documented error/notification path; a loading indicator alone does not establish persistence.

Implementation references

Paths below are relative to the application repository. This is source-reviewed behavior, not a recorded browser test.
  • apps/web/src/app/sites/tenant/[tenant]/login/page.tsx
  • apps/web/src/features/auth/member-otp-login-form.tsx
Data and access helpers: apps/web/src/lib/member-session.ts, apps/web/src/lib/server-api.ts, apps/web/src/lib/tenants.ts, apps/web/src/lib/api-client.ts

API behavior references

  • apps/api/src/member-auth/member-auth.controller.ts
  • apps/api/src/tenants/admins.controller.ts
  • apps/api/src/tenants/roles.controller.ts
  • apps/api/src/tenants/tenants.controller.ts
  • apps/api/src/announcements/announcements.controller.ts
  • apps/api/src/events/event-registrations.controller.ts
  • apps/api/src/events/events.controller.ts