neverstew
assertBearerToken
Script
assertBearerToken This val can be used to assert that a valid bearer token exists and has been signed by the secret provided. Example const handler = (req, res) => {
const authorization = req.get('authorization');
// throws if invalid
const token = @neverstew.assertBearerToken(@me.secrets.superSecret, authorization);
res.json(token);
}
0
Updated: October 23, 2023