@riocrypto/common 1.0.1330 → 1.0.1332

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.
@@ -95,7 +95,9 @@ export declare class RioClient {
95
95
  getSecurityQuestion(): Promise<SecurityQuestion>;
96
96
  authHasSecurityQuestion(): Promise<Boolean>;
97
97
  signout(): Promise<void>;
98
- verifyCode(phoneNumber: string, code?: string, authenticatorCode?: string): Promise<void>;
98
+ verifyCode(phoneNumber: string, code?: string, authenticatorCode?: string): Promise<{
99
+ id: string;
100
+ }>;
99
101
  createAuthenticatorSecret(): Promise<{
100
102
  secret: string;
101
103
  }>;
@@ -325,11 +325,12 @@ class RioClient {
325
325
  }
326
326
  verifyCode(phoneNumber, code, authenticatorCode) {
327
327
  return __awaiter(this, void 0, void 0, function* () {
328
- yield this.axios.post("/api/auth/verify-code", {
328
+ const response = yield this.axios.post("/api/auth/verify-code", {
329
329
  phoneNumber,
330
330
  code: code ? code : undefined,
331
331
  authenticatorCode: authenticatorCode ? authenticatorCode : undefined,
332
332
  });
333
+ return response.data;
333
334
  });
334
335
  }
335
336
  createAuthenticatorSecret() {
@@ -2,6 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAuthName = void 0;
4
4
  const getAuthName = (auth) => {
5
+ if (!auth.firstName || !auth.lastName) {
6
+ return "Anonymous";
7
+ }
5
8
  let name = auth.firstName;
6
9
  if (auth.middleName) {
7
10
  name += ` ${auth.middleName}`;
@@ -10,6 +13,6 @@ const getAuthName = (auth) => {
10
13
  if (auth.secondLastName) {
11
14
  name += ` ${auth.secondLastName}`;
12
15
  }
13
- return name || "Anonymous";
16
+ return name;
14
17
  };
15
18
  exports.getAuthName = getAuthName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1330",
3
+ "version": "1.0.1332",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",