Migration from 2.x to 3.0.x
This guide covers public API changes between 2.x and 3.0.x.
Breaking Changes
- Read OTP resend cooldown from configuration instead of verification status.
const configuration = await configurationService.getConfiguration("onboarding")
const otpResendPeriodSeconds = configuration.otpResendPeriodSeconds
otpResendPeriodSeconds is optional and can be undefined when you are still integrating with an older backend that does not return the field yet.
- Update OTP state handling.
Before:
if (state.type === WDOVerificationStateType.otp) {
const remainingAttempts = state.remainingAttempts
const resendCooldown = state.otpResendPeriodSeconds
}
After:
if (state.type === WDOVerificationStateType.otp) {
const remainingAttempts = state.remainingAttempts
const resendCooldown = configuration.otpResendPeriodSeconds
}
- OTP helpers moved from services to
WDODemoEndpointsService.
Before:
const otp = await activationService.getOTP()
const otp = await verificationService.getOTP()
After:
import { WDODemoEndpointsService } from "cordova-digital-onboarding"
const demoEndpointsService = new WDODemoEndpointsService(powerAuth, baseUrl)
const otp = await demoEndpointsService.getOTP(activationService)
const otp = await demoEndpointsService.getOTP(verificationService)
WDODemoEndpointsService is constructed the same way as WDOActivationService/WDOVerificationService (same powerauth instance and baseUrl). The endpoint strategy (WDOGetOTPEndpointStrategy) defaults to { type: "automaticMock" } and can be overridden as a second argument, e.g. demoEndpointsService.getOTP(activationService, { type: "custom", url: "https://example.com/otp/detail" }).
Checklist
- Fetch and keep
WDOConfigurationResponse.otpResendPeriodSecondsfor the active process type, and handleundefinedfor older backends. - Update call sites that read
WDOOtpState.otpResendPeriodSeconds. - Stop relying on OTP resend timing from
status()andverifyOTP()results. - Move demo OTP retrieval to a
WDODemoEndpointsServiceinstance’sgetOTP(...).
Last updated on Aug 18, 2026 (16:14)
Edit on Github
Send Feedback