@riocrypto/common 1.0.1204 → 1.0.1206
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.
|
@@ -69,6 +69,10 @@ export declare class RioClient {
|
|
|
69
69
|
authHasSecurityQuestion(): Promise<Boolean>;
|
|
70
70
|
signout(): Promise<void>;
|
|
71
71
|
verifyCode(phoneNumber: string, code?: string, authenticatorCode?: string): Promise<void>;
|
|
72
|
+
createAuthenticatorSecret(): Promise<{
|
|
73
|
+
secret: string;
|
|
74
|
+
}>;
|
|
75
|
+
confirmAuthenticatorRegistration(authenticatorCode: string): Promise<void>;
|
|
72
76
|
signin(password: string): Promise<Auth>;
|
|
73
77
|
signup(password: string, securityQuestion: SecurityQuestion, securityAnswer: string): Promise<{
|
|
74
78
|
auth: Auth;
|
|
@@ -218,6 +218,19 @@ class RioClient {
|
|
|
218
218
|
});
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
|
+
createAuthenticatorSecret() {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
const response = yield this.axios.post("/api/auth/authenticator");
|
|
224
|
+
return response.data;
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
confirmAuthenticatorRegistration(authenticatorCode) {
|
|
228
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
229
|
+
yield this.axios.post("/api/auth/confirm-authenticator", {
|
|
230
|
+
authenticatorCode,
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
}
|
|
221
234
|
signin(password) {
|
|
222
235
|
return __awaiter(this, void 0, void 0, function* () {
|
|
223
236
|
const response = yield this.axios.post("/api/auth/signin", {
|
package/build/types/auth.d.ts
CHANGED
|
@@ -9,7 +9,10 @@ export interface Auth {
|
|
|
9
9
|
previousPasswords?: string[];
|
|
10
10
|
apiKeys?: APIKey[];
|
|
11
11
|
isDisabled?: boolean;
|
|
12
|
-
|
|
12
|
+
authenticator?: {
|
|
13
|
+
secret?: string;
|
|
14
|
+
verified?: boolean;
|
|
15
|
+
};
|
|
13
16
|
telegram: {
|
|
14
17
|
username?: string;
|
|
15
18
|
lastVerified?: Date;
|