Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@types/authenticator
Advanced tools
Readme
npm install --save @types/authenticator
This package contains type definitions for authenticator (https://git.coolaj86.com/coolaj86/node-authenticator.js#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/authenticator.
/**
* Object returned by `verifyToken()`.
* delta: number
*/
export interface VerifyResult {
delta: number;
}
/**
* Generates a 32-character (160-bit) base32 key.
*/
export function generateKey(): string;
/**
* Generates a 6-digit (20-bit) decimal time-based token.
* @param formattedKey 32-character (160-bit) base32 key.
*/
export function generateToken(formattedKey: string): string;
/**
* Generates an `OTPAUTH://` scheme URI for QR Code generation.
* @param formattedKey 32-character (160-bit) base32 key.
* @param accountName User account e.g. user@gmail.com
* @param issuer The provider or service this account is associated with, URL-
* encoded according to RFC 3986
* @param algorithm The algorithm may have the values:
* - SHA1 (default)
* - SHA256
* - SHA512
* @param digits The digits parameter may have the values 6 or 8, and determines
* how long of a one-time passcode to display to the user.
* @param period The amount of time the TOTP code will be valid for, in seconds.
*/
export function generateTotpUri(
formattedKey: string,
accountName: string,
issuer: string,
algorithm: string,
digits: number,
period: number,
): string;
/**
* Validates a time-based token within a +/- 30 second (90 seconds) window
* returns `null` on failure or an object such as `{ delta: 0 }` on success.
* @param formattedKey 32-character (160-bit) base32 key.
* @param formattedToken 6-digit (20-bit) decimal time-based token.
*/
export function verifyToken(formattedKey: string, formattedToken: string): VerifyResult | null;
These definitions were written by .
FAQs
TypeScript definitions for authenticator
The npm package @types/authenticator receives a total of 15,502 weekly downloads. As such, @types/authenticator popularity was classified as popular.
We found that @types/authenticator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.