fragordie
05/11/2022, 3:05 PMromain9206
05/11/2022, 3:07 PMSession.init({
jwt: {
enable: true,
},
`
After you can get the JWT like this :
app.get("/getJWT", verifySession(), async (req, res) => {
let session = req.session;
let jwt = session.getAccessTokenPayload()["jwt"];
res.json({ token: jwt })
});
fragordie
05/11/2022, 3:09 PMromain9206
05/11/2022, 3:12 PMrp_st
05/11/2022, 3:12 PMrp_st
05/11/2022, 3:13 PMfront-token
which = to the access token's payload and that is sent as a header response.
You can store that in localstorage or cookies and read the access token payload from there.fragordie
05/11/2022, 3:15 PMsIdRefreshToken
?fragordie
05/11/2022, 3:15 PMsFrontToken
, which is returned on success login right?rp_st
05/11/2022, 3:18 PM