mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
refactor otp
This commit is contained in:
1 parent
a847e7aa9c
commit
e187644716
9 files changed
+121
-37
No files matched your search
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateOtpChallenges < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
create_table :otp_challenges do |t|
|
||||
t.string :key, null: false
|
||||
t.integer :version, null: false
|
||||
t.string :nonce, null: false
|
||||
t.integer :attempts, null: false, default: 0
|
||||
t.datetime :expire_at, null: false
|
||||
t.datetime :verified_at
|
||||
t.datetime :created_at, null: false
|
||||
|
||||
t.index %i[key version], unique: true
|
||||
end
|
||||
end
|
||||
end
|
||||
+12
-1
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.1].define(version: 2026_08_19_091500) do
|
||||
ActiveRecord::Schema[8.1].define(version: 2026_09_30_061927) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "btree_gin"
|
||||
enable_extension "pg_catalog.plpgsql"
|
||||
@@ -322,6 +322,17 @@ ActiveRecord::Schema[8.1].define(version: 2026_08_19_091500) do
|
||||
t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true
|
||||
end
|
||||
|
||||
create_table "otp_challenges", force: :cascade do |t|
|
||||
t.integer "attempts", default: 0, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "expire_at", null: false
|
||||
t.string "key", null: false
|
||||
t.string "nonce", null: false
|
||||
t.datetime "verified_at"
|
||||
t.integer "version", null: false
|
||||
t.index ["key", "version"], name: "index_otp_challenges_on_key_and_version", unique: true
|
||||
end
|
||||
|
||||
create_table "search_entries", force: :cascade do |t|
|
||||
t.bigint "account_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
|
||||
Reference in new issue
Block a user