mfa_devices table

The mfa_devices table in the Reddit Clone Database Schema schema has 8 columns, keyed by id, with 1 foreign key to users.

confirmed_at null means enrolment started but was never completed, so it must not be accepted at login. That distinction is what stops a half-finished setup locking someone out.

Columns (8)

Columns of the mfa_devices table
ColumnTypeConstraintsDescription
iduuidprimary key
user_iduuidnot null, references users.id
kindmfa_kindnot null
labelvarchar(80)
secret_hashvarchar(255)not null
confirmed_attimestamptz
last_used_attimestamptz
created_attimestamptznot null

Indexes (1)

  • (user_id, kind)

Relationships

  • mfa_devices.user_id references users.id