1.0.18 • Published 6 months ago
sjwt v1.0.18
SimpleJWT
The SimpleJWT sjwt
library simplifies using simplejwt.com. It gives you simple tools for your end users to register, login, etc for a complete user management experience. All end users have an associated JSON store that you can access as well.
Basic Usage
npm install sjwt
import {register} from 'sjwt';
const response = await register({email, password, projectId});
import {getAuthenticatedUser} from 'sjwt';
const user = await getAuthenticatedUser({projectId});
Documentation
Building and manually testing before publishing
npm run build
creates thedist
directorynpm pack
creates a tar file- To test, in some other project's package.json dependencies, put
"sjwt": "file:<path to tgz file>"
Note, sometimes you need to clean npm's cache:
npm cache ls | grep sjwt
list all sjwt cache entriesnpm cache clean <an entry from above>
delete an entry
Note, you often need to remove checksums from package-lock.json as well