Questions tagged [json-web-token]

A JSON Web Token (JWT) serves as a condensed and secure method to exchange claims between various parties while ensuring compatibility with URLs.

Efficiently handling jsonwebtoken errors in node and express

Here is the verification function I've created: exports.verifyToken = function(req, res, next){ var token = req.body.token; jwt.verify(token, config.sessionSecret, function(err, decoded) { if(err){ return next(err); }else{ ...

Guide on adding logout feature with jsonwebtoken in node.js

One common approach is to delete the browser's cookie first. However, I am interested in learning how to destroy tokens from the server side or how to verify logout functionality from the server side. ...

Protecting API Key in Angular 2

After spending more than a day searching on Google, I may not be using the right keywords to find the answer I need. Here is my current setup: I have an ExpressJS API running with pm2 on port 3000 An Angular 2 app being served via nginx Both of these a ...

Server sending JSON Web Token to the client along with a page redirect

I am currently developing my backend server using Node Express. To handle authentication in my application, I have implemented Passport-SAML and JWT for user session management. The overall flow is as follows: Users access the login endpoint. They are th ...

utilizing refresh tokens in Angular and Express-JWT

I'm interested in incorporating the Sliding expiration principle with JSON web tokens using Angular, Node.js, and express-jwt. I find myself a bit confused on how to go about this, as well as struggling to come across any examples or resources related ...