Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@usecapsule/user-management-client

Package Overview
Dependencies
Maintainers
6
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@usecapsule/user-management-client - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

13

dist/cjs/client.js

@@ -28,2 +28,3 @@ "use strict";

const axios_1 = __importDefault(require("axios"));
const query_string_1 = __importDefault(require("query-string"));
exports.USER_NOT_VERIFIED = 'user must verify biometrics';

@@ -106,4 +107,12 @@ exports.USER_NOT_AUTHENTICATED_ERROR = 'user must be authenticated';

this.getWebChallenge = (email, publicKey) => __awaiter(this, void 0, void 0, function* () {
const res = yield this.baseRequest.get(`/biometrics/challenge?email=${email}${publicKey ? `&publicKey=${publicKey}` : ''}`);
return res;
const queryParams = {};
if (email) {
queryParams['email'] = email;
}
if (publicKey) {
queryParams['publicKey'] = publicKey;
}
const query = query_string_1.default.stringify(queryParams);
const res = yield this.baseRequest.get(`/biometrics/challenge${query === '' ? '' : `?${query}`}`);
return res.data;
});

@@ -110,0 +119,0 @@ // POST /touch

@@ -22,2 +22,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import axios from 'axios';
import queryString from 'query-string';
export const USER_NOT_VERIFIED = 'user must verify biometrics';

@@ -100,4 +101,12 @@ export const USER_NOT_AUTHENTICATED_ERROR = 'user must be authenticated';

this.getWebChallenge = (email, publicKey) => __awaiter(this, void 0, void 0, function* () {
const res = yield this.baseRequest.get(`/biometrics/challenge?email=${email}${publicKey ? `&publicKey=${publicKey}` : ''}`);
return res;
const queryParams = {};
if (email) {
queryParams['email'] = email;
}
if (publicKey) {
queryParams['publicKey'] = publicKey;
}
const query = queryString.stringify(queryParams);
const res = yield this.baseRequest.get(`/biometrics/challenge${query === '' ? '' : `?${query}`}`);
return res.data;
});

@@ -104,0 +113,0 @@ // POST /touch

8

dist/types/client.d.ts

@@ -46,2 +46,6 @@ export declare const USER_NOT_VERIFIED = "user must verify biometrics";

}
export interface getWebChallengeRes {
challenge: string;
allowedPublicKeys?: string[];
}
export declare enum PublicKeyStatus {

@@ -74,3 +78,3 @@ PENDING = "PENDING",

interface verifyWebChallengeBody {
email: string;
email?: string;
sessionLookupId?: string;

@@ -161,3 +165,3 @@ signature: WebSignature;

patchSessionPublicKey: (userId: string, biometricId: string, body: sessionPublicKeyBody) => Promise<any>;
getWebChallenge: (email: string, publicKey?: string) => Promise<any>;
getWebChallenge: (email?: string, publicKey?: string) => Promise<getWebChallengeRes>;
touchSession: (regenerate?: boolean) => Promise<any>;

@@ -164,0 +168,0 @@ verifyWebChallenge: (body: verifyWebChallengeBody) => Promise<any>;

{
"name": "@usecapsule/user-management-client",
"version": "1.1.0",
"version": "1.2.0",
"main": "dist/cjs/index.js",

@@ -16,3 +16,4 @@ "module": "dist/esm/index.js",

"dependencies": {
"axios": "^1.6.3"
"axios": "^1.6.3",
"query-string": "^9.0.0"
},

@@ -33,3 +34,3 @@ "devDependencies": {

},
"gitHead": "283a16867bac0f5e1711b28a644d27145bb8b730"
"gitHead": "9bea780673093cac8a9ba5b40cf9ca4165f06611"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc