Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/rate-limit-audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ backend receiver, not `/oauth2/authorize` or `/oauth2/token`.

The student email verifier separately enforces a 60-second resend cooldown by
both user and recipient and a five-attempt challenge limit under the RBAC write
lock. Those controls should remain unchanged. The provider's sign-in limits,
lock. Those controls should remain unchanged. It also allows at most five codes per
person in any 24 hours, counted in a separate table that new codes, confirmations and
failed emails do not reset. The provider's sign-in limits,
PKCE, state, nonce, signature checks, disabled account-linking paths and
database-backed sharing must be retained.

Expand Down
8 changes: 8 additions & 0 deletions drizzle/0025_student_verification_daily_limit.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE TABLE "student_verification_send" (
"id" text PRIMARY KEY NOT NULL,
"user_id" text NOT NULL,
"sent_at" timestamp with time zone NOT NULL
);
--> statement-breakpoint
ALTER TABLE "student_verification_send" ADD CONSTRAINT "student_verification_send_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "studentVerificationSend_userId_sentAt_idx" ON "student_verification_send" USING btree ("user_id","sent_at");
Loading
Loading