Skip to content

Unexpected token % in JSON at position 0 #76

@rekkisomo

Description

@rekkisomo

I've been using jwt-simple for a while now, and it works flawlessly! Until when I need to add it to a WebSocket.

I'm getting the following error from jwt.decode(token, secret)

undefined:1
%d�ȝ������[�Ȏ���̍M��
^

SyntaxError: Unexpected token % in JSON at position 0
    at JSON.parse (<anonymous>)
    at Object.jwt_decode [as decode] (/mnt/c/Users/sledd/Desktop/stuff/Radwolf.LIVE/API/node_modules/jwt-simple/lib/jwt.js:75:21)

The token is correct, as it works with everything else. Is passport.authenticate required? if so, How would I go about adding it as a callback function rather than implementing it via app.<action>('/pth', passport.authenticate( ... ), ()=>{})?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions