Badge Verifier Backend

node v11.14.0
version: 1.0.0
endpointsharetweet
const express = require('express') const jwt = require('jsonwebtoken') const app = express() app.post('/verify', express.json(), (req, res) => { const payload = jwt.verify(req.body.token, `-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqMcpvFNDF4bwqPkQ9D81 jWpxe7VrWX4bs0sy0lzfwJ6Ouc0HSyyyrK3D7ZkjrF1nQV6Lqpaly0F6LNFlfVlj QcSDT9X8MJr5i0jvi/mzrxDUQrm07DJ806DMvp7m3Wgy673vkHUbP7Xu7OB2ZWSL l5tp/aJlVVUrxFYT/lOIh36sD8CFTW52g2f2yOnbM5XWXV9+EXkJ0ovXZSCD0IAJ JJ+PBkzMS7Yyz1vBs6eit8WrfIquaKMaZNaldqdVznLQ7/IJE4R4x9YcIhRsmWx+ 1Llh8nT9b6ac9I7tNRx4YDsc0+TLssNeDW4XZ+nKxhiH0GUxdeFPk1AqUZ5yPe7W mQIDAQAB -----END PUBLIC KEY-----`) res.json(payload) }) module.exports.endpoint = app
Loading…

no comments

    sign in to comment