feat: implement TASK-WP1-02 login sessions

This commit is contained in:
suyx
2026-07-28 16:28:30 +08:00
parent f467e7c09f
commit ee70001d44
20 changed files with 2480 additions and 28 deletions
+3 -3
View File
@@ -2,17 +2,17 @@ export interface RegistrationCodeMessage {
challengeId: string;
code: string;
email: string;
purpose: "register";
purpose: "register" | "login";
}
export interface ResendAdapter {
sendRegistrationCode(message: RegistrationCodeMessage): Promise<void>;
sendVerificationCode(message: RegistrationCodeMessage): Promise<void>;
}
export class MockResendAdapter implements ResendAdapter {
readonly calls: RegistrationCodeMessage[] = [];
async sendRegistrationCode(message: RegistrationCodeMessage) {
async sendVerificationCode(message: RegistrationCodeMessage) {
this.calls.push({ ...message });
}