Files
WRNexusJS/packages/auth/migrations/002_auth_otp_purpose.sql
T
2026-07-29 12:51:10 +05:30

10 lines
301 B
SQL

-- +up
-- Separate challenge purposes prevent a verification OTP from being replayed
-- as a passwordless-login or MFA challenge.
ALTER TABLE wrn_auth_otp_challenges
ADD COLUMN purpose VARCHAR(32) NOT NULL DEFAULT 'verification';
-- +down
ALTER TABLE wrn_auth_otp_challenges
DROP COLUMN purpose;