Authentication / 09
PIN setup, verification and reset
Central Auth PIN is distinct from local device biometric protection and transaction approval.
Set up and verify
After login read PIN status. Setup requires a primary credential; verify uses the existing PIN. The app may gate navigation with a local unlocked flag, not a new authentication session.
typescript
const status = await auth.pin.status();
if (!status.configured) await auth.pin.set(newPin, currentPassword);
else await auth.pin.verify(pin);Change PIN
Collect old and new PIN; clear inputs on completion. Incorrect PIN is not an invalid IAM token.
typescript
await auth.pin.change(currentPin, newPin);Forgot PIN
Request a reset using email; use the challenge ID and proof delivered to the user. Do not assume accepted:true contains a challenge ID.
typescript
await auth.pin.forgot(email);
// After receiving the challenge:
await auth.pin.reset({ challengeId, method: "otp", value: otp, newPin });