You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The access token is kept in a JavaScript-readable cookie and fetches don't send credentials #1975
After login, useSessionStore.setAccessToken writes the JWT with js-cookie (no HttpOnly), and every API module reads it back and sends it as a bearer header. Any XSS can read it. Meanwhile lib/auth-api.ts calls fetch without credentials: "include" (only wallet-api.ts sets it), so the backend's HttpOnly cookie is dropped for cross-origin requests and two auth mechanisms coexist.
Proposed change
Pick one model: let the backend own an HttpOnly cookie (all fetches use credentials: "include", CORS already allows credentials) and remove token handling from the client, or keep bearer tokens in memory with short lifetimes and refresh. Update middleware, RequireAdmin and every *-api.ts accordingly.
Acceptance criteria
The token is not readable from document.cookie.
Login, refresh and logout work end to end against the real API.
@ykargeee-bit has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hi Maintainer,
I’m a full-stack developer, and I’d like to contribute to the task. I’ll implement it carefully and efficiently thoroughly understand requirements and edge cases
Communicate promptly about suggestions or improvements. And I will provide regular progress updates and address blockers
Align with project goals through feedback and clarification.
@liutingqiu has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
The token is written with js-cookie and read back into a bearer header, so any XSS owns the session; meanwhile only wallet-api.ts sends credentials, so the backend's HttpOnly cookie is dropped everywhere else and two auth mechanisms coexist.Plan: pick the cookie model and make it consistent — remove token handling from the client (no more js-cookie), add credentials: "include" to every *-api.ts, update RequireAdmin and the middleware, and delete the now-dead bearer path. Acceptance is verified by document.cookie no longer containing the token and by login/refresh/logo
Congratulations, @ykargeee-bit! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @ykargeee-bit: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
😎 @ykargeee-bit: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.
Activity
ykargeee-bit commentedon Oct 17, 2026
@ykargeee-bit has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @ykargeee-bit to this issue.
liutingqiu commentedon Oct 17, 2026
@liutingqiu has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @liutingqiu to this issue.
drips-wave commentedon Oct 17, 2026
Congratulations, @ykargeee-bit! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @ykargeee-bit: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
grantfox-oss commentedon Oct 18, 2026
🎉 This issue has been marked as completed on GrantFox!
@ykargeee-bit's PR #2049 was approved and merged by @yusuftomilola.
🏆 @ykargeee-bit: You earned 40 FoxPoints for this contribution! Your current tier: Builder (1,865 total points). Track your full progress on GrantFox.
👏 Great work, @ykargeee-bit! Keep contributing to DistinctCodes.
drips-wave commentedon Oct 18, 2026
This issue has been completed by @ykargeee-bit as part of the Stellar Wave Program's 10th Wave 🥳
😎 @ykargeee-bit: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.
Cookie-based session model, admin role gate and 401 handling (ykargee…
Fix platform basics: env config, money formatting, providers, compone…
Shared HTTP layer, admin nav and component placement cleanup (devrabi…