@riocrypto/common-server 1.0.1378 → 1.0.1379
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,7 +26,7 @@ declare class ClusterClient {
|
|
|
26
26
|
sendVerificationCode(phoneNumber: string): Promise<{
|
|
27
27
|
hasAuthenticatorEnabled: boolean;
|
|
28
28
|
}>;
|
|
29
|
-
|
|
29
|
+
verifyCode(phoneNumber: string, code?: string, authenticatorCode?: string): Promise<void>;
|
|
30
30
|
}
|
|
31
31
|
export declare const buildClusterClient: () => Promise<ClusterClient>;
|
|
32
32
|
export {};
|
|
@@ -204,9 +204,13 @@ class ClusterClient {
|
|
|
204
204
|
return response.data;
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
|
-
|
|
207
|
+
verifyCode(phoneNumber, code, authenticatorCode) {
|
|
208
208
|
return __awaiter(this, void 0, void 0, function* () {
|
|
209
|
-
yield this.axios.post(`${this.baseUrl}/api/auth/verify-code`, {
|
|
209
|
+
yield this.axios.post(`${this.baseUrl}/api/auth/verify-code`, {
|
|
210
|
+
phoneNumber,
|
|
211
|
+
code: code ? code : undefined,
|
|
212
|
+
authenticatorCode: authenticatorCode ? authenticatorCode : undefined,
|
|
213
|
+
}, {
|
|
210
214
|
headers: {
|
|
211
215
|
"x-cluster-api-key": this.clusterApiKey,
|
|
212
216
|
},
|