I’m designing an authentication & registration experience for a fintech app (public portal + staff portal) and would appreciate best-practice guidance on how to implement it cleanly in Keycloak. The core needs are:
-
Multi-step registration with email/phone capture, SMS OTP verification, and profile completion.
-
Login with username/email or phone, optionally followed by OTP (step-up).
-
Deduplication: if a phone number or national ID already exists, detect it early (before creating the account) and branch the flow (block, recover, or escalate to manual review).
-
Auditability, rate-limits, and a path for staff to override/verify suspicious cases.
Environment
-
Keycloak: (planning latest 24/25.x, can adapt if a version matters)
-
Clients: Spring Boot (resource servers) + Angular (SPA)
-
SMS provider: pluggable (we can call an external SMS service)
-
Data residency/PII constraints apply (phone & national ID are sensitive)
Desired user journeys (simplified)
Registration (Public)
-
User enters phone + email.
-
Send SMS OTP → verify.
-
Collect profile fields including nationalId.
-
Dedup check (phone and nationalId):
-
If match → show “account exists / recovery” or escalate to manual verification.
-
If no match → create user, mark attributes, complete.
-
Login (Public)
-
Username/email/phone → password.
-
Optional step-up OTP based on risk signals or device trust.
Staff portal
- Username/password
