@universal-packages/trpc-authentication-session
v1.1.2
Published
Session dynamics for universal trpc authentication
Downloads
514
Readme
tRPC Authentication Session
Session dynamics for trpc authentication.
Install
npm install @universal-packages/trpc-authentication-session
npm install @universal-packages/trpc-authentication
Dynamics
By installing this package the default authentication controllers dynamics related to session (user-from-context
and set-session
) will be overridden to use express-session capabilities.
Context Creator
createSessionContext
You can compound your context to include the session object coming form the request with this context creator.
function createContext(options) {
return {
...createSessionContext(options)
}
}
Typescript
This library is developed in TypeScript and shipped fully typed.
Contributing
The development of this library happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving this library.