AOSSIE-Org / AOSSIE-Org/DebateAI

[SECURITY]: The JWT token is stored in the local-storage.

未关闭
#204 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
84
派生
198
平均合并
2 天 19 小时
30 天内合并 PR
30

描述

I just noticed that after logging in to the DebateAI, the jwt token is getting stored into the local storage, and i had heard from sources that storing the token in the local storage is not safe. But I got to know that the token's only payload is `email` but still it's not safe, I visited the auth0 official docs (https://auth0.com/docs/secure/security-guidance/data-security/token-storage#don-t-store-tokens-in-local-storage) and even they does not guide to store the tokens in local storage, due to a cross-site scripting (XSS) attack.

Image

Changes we need to get back to a secure auth -
- set `credientials: true` in frontend and CORS.
- Setting and reading HTTP-only cookies
- Correcting the CORS config.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。