Socket
Book a DemoInstallSign in
Socket

actioncable-jwt

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

actioncable-jwt

actioncable with jwt token

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
61
916.67%
Maintainers
1
Weekly downloads
 
Created
Source

Action Cable Jwt

This project solves the following issues which the official implementation of action cable hasn't solved:

  • Authenticate through jwt token

    It is solved simply by appending jwt token in the Sec-WebSocket-Protocol of the headers of initial WebSocket connection's.

  • Make action cable compatible with SSR frameworks , ex., Nextjs.

    The original generated action_cable.js attaches self value which can't be recognized by backend's Node server. It is solved by one line config in rollup.config.js

    
    intro: "var self = typeof window !== 'undefined' ? window : global;"
    
  • Generate the asset in production mode

Besides, this project is setup as a standalone action cable js project which is ready for your play and development.

Usage

yarn add actioncable-jwt

Keywords

websockets

FAQs

Package last updated on 19 Dec 2019

Did you know?

Socket

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