Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Parity between Koa-Session and Fusion's JWT Session #170

Open
saumitrabhave opened this issue Mar 31, 2019 · 0 comments
Open

Parity between Koa-Session and Fusion's JWT Session #170

saumitrabhave opened this issue Mar 31, 2019 · 0 comments

Comments

@saumitrabhave
Copy link

Other koa middlewares (For Eg. koa-passport) , which work with sessions, expect session to be exposed at ctx.session as a plain key-val object. but the JWTSession exposed by this plugin exposes session ONLY as a plugin service, making it impossible to integrate transparently with other koa-middlewares that work with sessions.

Type of issue

Feature Request

Description

When using this plugin as Session Provider in fusion app, any koa-middleware should be able to transparently use it just as if its koa's session (For Eg. koa-session)

Basic requirements for that would be to

  1. Expose session object in context at ctx.session
  2. session should allow access like plain object and should not mandate usage of get and set methods for working with values in session.

Current behavior

Session can only be accessed by creating a fusion plugin and declaring dependency on JWTSession.

Miidlewares written for koa with no consideration of fusion can not access session as these libraries expect session to be exposes as property on context object.

Expected behavior

koa-middlewares should be able to access session via context, For Eg. ctx.session

Steps to reproduce

NA

Your environment

NA

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant