jdx / jdx/mean-sample

jwt starts and ends with double quotes before encoding

Open
#10 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
165
Forks
81
PR merge metrics
No merged PRs in 30d

Description

Hi, i've fixed the issue of double quoting with the following code:

var auth = req.headers['x-auth'];
auth = auth.replace(/"([^"]+(?="))"/g, '$1');
auth = jwt.decode(auth, config.secret);

I wonder why it happens!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.