# fake-authentication

> A Fake Authentication System Using LocalStorage

Latest version **1.0.0** (published 2019-10-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install fake-authentication
pnpm add fake-authentication
yarn add fake-authentication
bun add fake-authentication
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-10-30 |
| First published | 2019-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | KarthikeyanRanasthala |
| Maintainers | karthikeyan-ranasthala |

## Links

- npm: https://www.npmjs.com/package/fake-authentication
- Repository: https://github.com/KarthikeyanRanasthala/fake-authentication
- npm.io page: https://npm.io/package/fake-authentication

## Dependencies (2)

- [uuid](https://npm.io/package/uuid.md) ^3.3.3
- [crypto-js](https://npm.io/package/crypto-js.md) ^3.1.9-1

## Recent versions

- 1.0.0 (latest) — 2019-10-30

## README

# Fake Authentication

## Overview

A Fake Authentication System Using LocalStorage.

## Features

- Handles SignUp, SignIn, SignOut and Persistent Authenticated State
- Passwords are encrypted with PBKDF2
- Each user is assigned with an unique id

## Usage

If you're using yarn, `yarn add fake-authentication`

If you're using npm, `npm install fake-authentication`

```javascript
import fakeAuth from "fake-authentication";

// For SignUp
fakeAuth
  .signUp("someone@something.com", "password")
  .then(resp => console.log(resp)) // { message: "User Created Successfully", uid: "some-uid" }
  .catch(err => console.log(err)); // { message: "User Already Exists" }

// For SignIn
fakeAuth
  .signIn("someone@something.com", "password")
  .then(resp => console.log(resp)) // { message: "SignIn Successful", uid: "some-uid" }
  .catch(err => console.log(err)); // { message: "Password Did Not Match || User Doesn't Exist" }

// Check AuthState
fakeAuth
  .isAuthenticated()
  .then(resp => console.log(resp)) // { message: "Authenticated", isAuth: true, data: { email: "someone@something.com", uid: "some-uid" } }
  .catch(err => console.log(err)); // { message: "Not Authenticated", isAuth: false, data: "" }

// For SignOut
fakeAuth.signOut();
```

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