Created
January 27, 2021 09:58
-
-
Save bharathirajatut/396992bd761a30a1fcdb8523ff0009fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//login query example | |
app.post("/verify", (request, response) => { | |
const req=request.body | |
var output={} | |
try | |
{ | |
var info = jwt.verify(req.token, privateKey, { algorithm: 'HS512' }); | |
output["verified"]=1; | |
}catch(err) | |
{ | |
output["verified"]=0; | |
} | |
response.json(output) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment