Comments (3)
Doesn't seem like the error is coming from paseto, but rather, node. Maybe the worker_threads
module is not available in that build?
from paseto.
Going to retry with an official v12 runtime when that becomes available on lambda
from paseto.
Works fine in the official node12.x
runtime.
START RequestId: d8726aa1-4c84-44f5-895c-090498e0b76d Version: $LATEST
2019-11-22T13:29:41.688Z d8726aa1-4c84-44f5-895c-090498e0b76d INFO issued token: v2.public.eyJ0ZXN0IjoxMiwiaWF0IjoiMjAxOS0xMS0yMlQxMzoyOTo0MS42ODVaIn20kNcGmftZH2XPSek6tGmzi_Xo1W9eLV1RnMflIDJAGCqsFCw0ewH7Xo3ZqV8G_a5nxndRgG_rmRzkQUPKp0AI
2019-11-22T13:29:41.688Z d8726aa1-4c84-44f5-895c-090498e0b76d INFO verified: {
payload: { test: 12, iat: '2019-11-22T13:29:41.685Z' },
footer: undefined,
version: 'v2',
purpose: 'public'
}
END RequestId: d8726aa1-4c84-44f5-895c-090498e0b76d
REPORT RequestId: d8726aa1-4c84-44f5-895c-090498e0b76d Duration: 4.98 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 93 MB
const { V2 } = require('paseto')
module.exports.handler = async (event, context) => {
const key = await V2.generateKey('public')
const token = await V2.sign({ test: 12 }, key)
console.log('issued token:', token, '\n')
const verified = await V2.verify(token, key, { complete: true })
console.log('verified:', verified, '\n')
}
from paseto.
Related Issues (17)
- question: how to you generate and export private keys? HOT 12
- Generating a public paseto key should give the public key attached HOT 1
- Replacing libsodium-wrappers HOT 3
- Characters that Paseto uses to create tokens HOT 1
- question: How I create a secret key from a string? HOT 3
- TypeError: keyObject must be a KeyObject instance HOT 2
- Node 14 bug - TypeError: Cannot read property 'subtle' of undefined (line 10 of crypto_worker.js) HOT 1
- bug: typescript types missing in install HOT 1
- Fails to verify with `complete: true` option if there is no footer. HOT 1
- `{}` makes decryption results hard to use HOT 3
- At paseto/lib/v1/sign.js HOT 1
- Bug cannot read property 'subtle' of undefined HOT 1
- Not using ISO8601 Date Format HOT 2
- question: How many requests per second it handles? HOT 1
- question: Nodejs Crypto vs libsodium HOT 9
- stuck on key length error HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paseto.