From be2ce166cfa3ac3a808e6a0e93d73f33fcb45eb7 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 9 Oct 2023 18:50:53 +0800 Subject: [PATCH] feat: MFA/TOTP_recover --- proto/auth/v1/auth_service.proto | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/proto/auth/v1/auth_service.proto b/proto/auth/v1/auth_service.proto index a0cef75..aa57a88 100644 --- a/proto/auth/v1/auth_service.proto +++ b/proto/auth/v1/auth_service.proto @@ -57,6 +57,13 @@ service AuthService { body: "*" }; } + rpc RecoverTOTP(RecoverTOTPRequest) returns (RecoverTOTPResponse) { + option (google.api.http) = { + post: "/gapi/auth/v1/mfa/totp/recover", + body: "*" + }; + } + } message RegisterRequest { @@ -125,4 +132,13 @@ message DisableTOTPResponse {} message CheckTOTPRequest { string totp_code = 1; } -message CheckTOTPResponse {} \ No newline at end of file +message CheckTOTPResponse {} + +message RecoverTOTPRequest { + repeated string recovery_code= 1; +} + +message RecoverTOTPResponse { + string new_secret_key = 1; + repeated string new_recovery_code = 2; +}