feat: implement api for "forgot password?" flow (#14915)

Relates to https://github.com/coder/coder/issues/14232

This implements two endpoints (names subject to change):
- `/api/v2/users/otp/request`
- `/api/v2/users/otp/change-password`
This commit is contained in:
Danielle Maywood
2024-10-04 11:53:25 +01:00
committed by GitHub
parent 8785a51b09
commit 4369f2b4b5
25 changed files with 1007 additions and 4 deletions
+12
View File
@@ -178,6 +178,13 @@ export interface BuildInfoResponse {
readonly deployment_id: string;
}
// From codersdk/users.go
export interface ChangePasswordWithOneTimePasscodeRequest {
readonly email: string;
readonly password: string;
readonly one_time_passcode: string;
}
// From codersdk/insights.go
export interface ConnectionLatency {
readonly p50: number;
@@ -1155,6 +1162,11 @@ export interface Replica {
readonly database_latency: number;
}
// From codersdk/users.go
export interface RequestOneTimePasscodeRequest {
readonly email: string;
}
// From codersdk/workspaces.go
export interface ResolveAutostartResponse {
readonly parameter_mismatch: boolean;