Registering for TOTP
🔄 Automatic TOTP Registration Flow
✅ When Does It Happen?
- Immediately after successful login, the REL-ID SDK automatically checks and attempts to register the user for TOTP.
- This process is automatic—the application does not need to manually invoke any API.
🧠 What the SDK Does
- Detects that login has succeeded.
- Checks if:
- TOTP is supported for the user.
- The user is not already registered for TOTP on the current device.
- If registration is needed:
- SDK attempts to register the user silently in the background.
📩 Event: onTOTPRegistrationStatus
onTOTPRegistrationStatusAfter attempting to register for TOTP, the SDK emits the onTOTPRegistrationStatus event to notify the application about the outcome.
🧑💻 Developer Guidance
- ✅ If successful: No additional action is needed. User is now ready to generate TOTP.
- ❌ If failed:
- Log the error or show feedback to the user.
- Retry registration later or prompt user manually if TOTP is required.
This registration step ensures that TOTP functionality is set up seamlessly for secure authentication and offline scenarios.
Updated 7 months ago
