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)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| user_id | uuid | not null, references users.id | |
| kind | mfa_kind | not null | |
| label | varchar(80) | ||
| secret_hash | varchar(255) | not null | |
| confirmed_at | timestamptz | ||
| last_used_at | timestamptz | ||
| created_at | timestamptz | not null |
Indexes (1)
(user_id, kind)
Relationships
mfa_devices.user_idreferencesusers.id