Socket
Socket
Sign inDemoInstall

@salsita/koa-jwt-auth

Package Overview
Dependencies
22
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @salsita/koa-jwt-auth

[![NPM version](https://img.shields.io/npm/v/@salsita/koa-jwt-auth.svg)](https://www.npmjs.com/package/@salsita/koa-jwt-auth) ![Downloads](https://img.shields.io/npm/dm/@salsita/koa-jwt-auth.svg?style=flat) ![Licence](https://img.shields.io/npm/l/@salsita


Version published
Weekly downloads
1
Maintainers
2
Created
Weekly downloads
 

Readme

Source

@salsita/koa-jwt-auth

NPM version Downloads Licence Dependency Status devDependency Status

Configures authentication middleware.

Important options:

  • key - secure key for hashing payload (if persistent key not provided, new key is generated with each server start - logging out all users)
  • version - should be increased with every change in createSession function, so users using old structure are logged out
  • createSession - function returning data which identifies user (usually user id)
  • getUserForSession - function which checks if user exists/session is valid (data returned from createSession are supplied) and result is put into ctx.state.user

FAQs

Last updated on 26 Oct 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc