@riocrypto/common 1.0.1203 → 1.0.1205

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.
@@ -68,7 +68,10 @@ export declare class RioClient {
68
68
  getSecurityQuestion(): Promise<SecurityQuestion>;
69
69
  authHasSecurityQuestion(): Promise<Boolean>;
70
70
  signout(): Promise<void>;
71
- verifyPhoneCode(phoneNumber: string, code: string): Promise<void>;
71
+ verifyCode(phoneNumber: string, code?: string, authenticatorCode?: string): Promise<void>;
72
+ createAuthenticatorSecret(): Promise<{
73
+ secret: string;
74
+ }>;
72
75
  signin(password: string): Promise<Auth>;
73
76
  signup(password: string, securityQuestion: SecurityQuestion, securityAnswer: string): Promise<{
74
77
  auth: Auth;
@@ -209,14 +209,21 @@ class RioClient {
209
209
  yield this.axios.post("/api/auth/signout", {});
210
210
  });
211
211
  }
212
- verifyPhoneCode(phoneNumber, code) {
212
+ verifyCode(phoneNumber, code, authenticatorCode) {
213
213
  return __awaiter(this, void 0, void 0, function* () {
214
214
  yield this.axios.post("/api/auth/verify-code", {
215
215
  phoneNumber,
216
- code,
216
+ code: code ? code : undefined,
217
+ authenticatorCode: authenticatorCode ? authenticatorCode : undefined,
217
218
  });
218
219
  });
219
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
+ }
220
227
  signin(password) {
221
228
  return __awaiter(this, void 0, void 0, function* () {
222
229
  const response = yield this.axios.post("/api/auth/signin", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1203",
3
+ "version": "1.0.1205",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",