# passwordgrid

> NPM Package to Generate Password Grid

Latest version **1.0.3** (published 2025-02-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install passwordgrid
pnpm add passwordgrid
yarn add passwordgrid
bun add passwordgrid
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2025-02-14 |
| First published | 2025-02-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kumar Sundaram |
| Maintainers | sundaramkumar |
| Keywords | password, password grid, secure password, password generator |

## Links

- npm: https://www.npmjs.com/package/passwordgrid
- npm.io page: https://npm.io/package/passwordgrid

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2025-02-14
- 1.0.2 — 2025-02-14
- 1.0.1 — 2025-02-13
- 1.0.0 — 2025-02-13

## README

# PasswordGrid

NPM Package to Generate Password Grid.

## Stay Secure with 2FA Passcode Grid

A password grid, also called a "passcode grid," is a table with rows and columns containing unique letters or numbers where you select specific combinations to authenticate, essentially acting as a visual password by choosing specific coordinates on the grid to form your login credentials; to use it, you would typically be presented with a grid, then asked to enter the letters or numbers from specific grid positions (like "A3, B2, C1") to log in, usually requiring you to save or print the grid for future use as it's unique to your account.

## Key points about using a password grid:

### Access your grid:

While designing a authentication system, you can ask your users to enter the values in the Password grid as a 2FA passcode.
The user will be prompted to access your grid, which you should generate and show them.
The password grid can be generated at the time of user signin and they should save it for future use. so that the user can use the grid for 2FA authentication.

### Select coordinates:

The system will ask the user to enter the letters or numbers from specific grid positions, usually indicated by a combination of a column letter and row number (e.g., "B2", A8, etc).

### Enter the code:

The user will enter the values from the requested grid coordinates into the 2FA login field to authenticate.

## Benefits of a password grid:

### Enhanced security:

Since the user selects multiple characters from a grid, it's harder for someone to guess your password compared to a simple text-based password.

### Shoulder surfing resistant:

Less susceptible to "shoulder surfing" attacks where someone observes your password entry because the grid doesn't reveal the exact password sequence.

### Accessibility for some users:

Can be easier for people who struggle with remembering complex passwords.

## Usage

```javascript
const passwordGrid = require("passwordGrid");
var grid = new passwordGrid();
var gridStr = grid.generateGrid();
console.log(gridStr);
```

This will generate a password grid similar to

```
     1   2   3   4   5   6   7   8
   +-------------------------------+
A  | ) | s | h | > | # | o | # | + |
   |-------------------------------|
B  | ` | s | ? | j | o | g | [ | ' |
   |-------------------------------|
C  | r | ? | @ | & | ? | k | ] | < |
   |-------------------------------|
D  | - | , | p | > | ! | + | = | z |
   |-------------------------------|
E  | i | g | < | l | + | e | s | ? |
   |-------------------------------|
F  | + | q | ' | i | j | # | + | a |
   |-------------------------------|
G  | } | r | b | r | i | @ | = | @ |
   |-------------------------------|
H  | ` | r | z | % | < | @ | ; | ~ |
   +-------------------------------+

```

### Grid Configuration

While generating grid, you can configure the grid generation parameters.

```javascript
grid.gridConfig({
  numbers: false,
  alphaUpper: false,
  alphaLower: true,
  symbols: true,
});
```

The generated grid size is 8x8.

If everything is set to _false_ as below, then it is invalid, so grid parameters will be set to default.

```javascript
grid.gridConfig({
  numbers: false,
  alphaUpper: false,
  alphaLower: false,
  symbols: false,
});
```

---
_Source: https://npm.io/package/passwordgrid · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
