📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

@getanthill/sec

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getanthill/sec

Anthill project security package

0.7.0
latest
Source
npm
Version published
Weekly downloads
331
40.85%
Maintainers
4
Weekly downloads
 
Created
Source

getanthill Security Layer

pipeline Quality Gate Status

Coverage Vulnerabilities Security Rating

Getting Started

First, you need install the package:

npm install -S @getanthill/sec

Then, your client can follow the steps to register or signin a user to your app, then activate MFA validation.

// 1. Signin part:
const tokens = auth.getTokens(email, password);

// 2. MFA Setup part: (only on registration)
// Master key generation #keep-it-secret-keep-it-safe
const masterKey = otp.generateMasterKey();
// Secret key generation from Master key
const secretKey = otp.generateSecretFromMaster(masterKey);

// Validate MFA:
const isValid = otp.verify('123456', secretKey);

// Create the store:
const store = new Store(tokens.encryption, secretKey);

// Manage your data as always:
store.data = { hello: 'world' }; // Always encrypted data

Roadmap

Keywords

anthill

FAQs

Package last updated on 15 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts