# jsonwebtoken-template

> jsonwebtoken hooks

Latest version **1.0.8** (published 2021-11-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install jsonwebtoken-template
pnpm add jsonwebtoken-template
yarn add jsonwebtoken-template
bun add jsonwebtoken-template
```

## 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.8 |
| Published | 2021-11-16 |
| First published | 2021-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | Andy Santisteban |
| Maintainers | andy_santisteban |

## Links

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

## Dependencies (2)

- [jsdoc](https://npm.io/package/jsdoc.md) ^3.6.7
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.5.1

## Recent versions

- 1.0.8 (latest) — 2021-11-16
- 1.0.7 — 2021-11-16
- 1.0.6 — 2021-11-15
- 1.0.5 — 2021-11-15
- 1.0.4 — 2021-11-15
- 1.0.3 — 2021-11-15
- 1.0.2 — 2021-11-15
- 1.0.1 — 2021-11-15

## README

# jsonwebtoken-template

Library that facilitates the use of jwt using reusable functions from Frontend with React.js

## Installation

```bash
npm i jsonwebtoken-template
```

## Usage

```javascript
const useJwt = require ('jsonwebtoken-template')

# Define Object
const user = {
   name : "Andy",
   password: "Santisteban"
}
# Define time expired
const expired={
    time:"1h"
}
# Define word secret
const varEnv="secret"

# Create Token
const toker = useJwt.signJwt(user,expired,varEnv)

console.log(toker)

# Decodificed Token
const decoded = useJwt.verifyJwt(toker,varEnv)

console.log(decoded)

```

If you want to add it to the browser's localStorage you can use the following example


```javascript

 sendTokenLocalStorage(key,token)

```

Si deseas agregarlo al sessionStorage del navegador puedes utilizar el siguiente ejemplo (no recomendable)

```javascript


 sendTokenSessionStorage(key,token)

```


## Version

1.0.6

## Author

Andy Santisteban

## License

[MIT](https://choosealicense.com/licenses/mit/)

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