最近搜索
没有最近搜索

Dane Wheeler
已加入2023年3月24日
·
最后活动2023年4月18日
关注
0
关注者
0
活动总数
6
投票
2
订阅
1
活动概览
标记
文章
帖子
社区评论
文章评论
活动概览
的最新活动 Dane Wheeler
Dane Wheeler 进行了评论,
Manuel Moreira this sounds like a different issue than an expired JWT. For reference, below is what a working JWT looks like for my app. Perhaps you can compare yours to it to confirm you have the right header, field names, and data types.
查看评论 · 已于 2023年4月18日 发布 · Dane Wheeler
0
关注者
0
投票
0
评论
Dane Wheeler 进行了评论,
Manuel Moreira did you try parsing your JWT and confirming it is properly formed? Try copy/pasting your JWT into https://jwt.io to make sure it is valid.
查看评论 · 已于 2023年4月18日 发布 · Dane Wheeler
0
关注者
0
投票
0
评论
Dane Wheeler 进行了评论,
Check that your token is not expired. The "exp" field is specified in seconds since the UNIX epoch, so a token with exp = 12345678 expired sometime around February 1971. In TypeScript with the jsonwebtoken library, you could do something like:
import jwt, { SignOptions } from "jsonwebtoken";
const header = {
alg:"HS256",
typ:"JWT",
kid:zenDeskKid,
};
const options: SignOptions = {
header,
expiresIn: 60 * 60 * 6, // <-- this will convert to UNIX epoch time
};
const payload = {
scope:"user",
name: ...,
email: ... ,
external_id: ...,
};
var token = jwt.sign(payload, zenDeskSecret, options);
查看评论 · 已于 2023年3月24日 发布 · Dane Wheeler
0
关注者
0
投票
0
评论