ensure-token
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Ensure Token

A package for ensuring bearer token is available in the header of the HTTP Request using Express


NPM

Installation

 npm install ensure-token --save
 OR
 yarn add ensure-token
 OR
 pnpm install ensure-token

Usage

javascript or typescript

 import { ensureToken } from 'ensure-token'; 

Add the ensureToken in your route like this:

app.get('/your-route', ensureToken, (req, res) => {

})

This will work on bearer tokens only for now. More Verifications will be added later.

Don't forget to like this repo. If you have any questions feel free to ask!

Created by Ethern Myth

Licensed under the MIT license.


Last updated 18/02/2024.

Package Sidebar

Install

npm i ensure-token

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

6.93 kB

Total Files

9

Last publish

Collaborators

  • ethernmyth