Skip to content

Conversation

mao-sz
Copy link
Contributor

@mao-sz mao-sz commented Jun 28, 2025

Because

As part of the Node revamp's 2nd milestone

This PR

  • Adds a new lesson discussing TOP-scoped session management comparisons/necessities

Issue

Closes #29735

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

@github-actions github-actions bot added the Content: NodeJS Involves the NodeJS course label Jun 28, 2025
@mao-sz mao-sz mentioned this pull request Jun 28, 2025
3 tasks
mao-sz added 5 commits June 29, 2025 01:14
Not meant as a 'stateless/JWT is always bad in every context' thing
"or anyone" bit ends up reading awkwardly, and that example is focused on the impact of stale data. The impact of other users using copied tokens is already addressed in the next section.
Copy link
Member

@01zulfi 01zulfi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🚀

mao-sz added 2 commits June 29, 2025 10:04
Loki is not related to Odin. That's a Marvel thing... oops
@mao-sz mao-sz mentioned this pull request Jul 4, 2025
7 tasks
@01zulfi 01zulfi added the Project Node Revamp Issues/PRs related to the Node Revamp project label Jul 19, 2025
@mao-sz
Copy link
Contributor Author

mao-sz commented Jul 20, 2025

Holding off on addressing review suggestions while https://discord.com/channels/505093832157691914/1181210153358471168/1390089775846785175 is still up for discussion. Will address accordingly one we know how we wish to proceed.

@mao-sz mao-sz mentioned this pull request Jul 21, 2025
2 tasks
@mao-sz mao-sz changed the title New lesson: Stateful vs Stateless Authentication New lesson: Session Management in Practice Jul 27, 2025
@mao-sz mao-sz requested review from 01zulfi and Asartea July 27, 2025 17:48
@mao-sz
Copy link
Contributor Author

mao-sz commented Jul 27, 2025

As discussed on Discord, the lesson has now had wording amendments as per review applied, as well as additional content on third-party cookies and reverse proxies, kept within only the scope needed for TOP projects.

If you want to see the code in action, check out https://github.com/mao-sz/test-proxy
Cloudflare Pages does not support reverse proxying to an external domain but Netlify and Vercel do with the appropriate rewrite rules, and Express trusting 1 level of proxy (when hosted on Render).
No CORS setup needed nor any cross-site configuration for requests in client-side code (e.g. credentials: 'include'.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor grammar check. But where you said "(though this is of course sometimes an desirable security feature, like with many banking websites)." should say "sometimes a desirable security feature"

Copy link
Contributor Author

@mao-sz mao-sz Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Though you're looking at an outdated commit - the latest version has that fixed (fixed in 3e0b841).

There will have been quite a few changes since the commit you had looked at.

@Asartea
Copy link
Contributor

Asartea commented Aug 21, 2025

Looks good to me

@Asartea
Copy link
Contributor

Asartea commented Aug 21, 2025

One comment: how necessary is http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/ ? It's currently giving security warnings because it its lacking a valid certificate; I would prefer to avoid sites which work only over HTTP, especially as HTTPS only mode is becoming more and more common

@mao-sz
Copy link
Contributor Author

mao-sz commented Aug 21, 2025

Edit: One another review, I think it's fine to drop the assignment


One comment: how necessary is http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/ ? It's currently giving security warnings because it its lacking a valid certificate; I would prefer to avoid sites which work only over HTTP, especially as HTTPS only mode is becoming more and more common

Hmmm. I really like that article and how it explains things, but I agree that lacking https sucks. From an outside perspective, how do you feel about the assignment section as a whole? Do you feel it's "complete" without the cryto resource? Or do you feel the cryto resource fills what would otherwise be a gap, and so would benefit from finding an equivalent https resource if possible?

Website served with HTTP (no HTTPS), and not strictly necessary given
the other assigned resources.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: NodeJS Involves the NodeJS course Project Node Revamp Issues/PRs related to the Node Revamp project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Lesson: Stateful vs Stateless Auth
4 participants