Skip to content

Conversation

@mao-sz
Copy link
Contributor

@mao-sz mao-sz commented May 17, 2025

Because

As part of the Node revamp's 2nd milestone

This PR

  • Adds a new lesson for stateless auth with JWTs

Issue

Closes #29519

Additional Information

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

mao-sz added 10 commits May 10, 2025 13:17
No need for a full handholdy tutorial. Just highlight the differences
between stateful/stateless and session/JWT
req.headers is a Node built-in getter as part of the Message interface
(which extends Request). Not as intuitive to find docs for since people
will likely look at the Request interface first.

It'll be easier for learners to find an Express method in Express docs - consistent with
other Express methods used in this and other lessons.
More detail left for a future Sessions vs JWTs lesson
@github-actions github-actions bot added the Content: NodeJS Involves the NodeJS course label May 17, 2025
Copy link
Contributor

@Zadag Zadag left a comment

Choose a reason for hiding this comment

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

Various grammar and tonal improvements.

Co-authored-by: Kevin Browne <[email protected]>
@01zulfi 01zulfi added the Project Node Revamp Issues/PRs related to the Node Revamp project label May 24, 2025
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.

Looking real good, just a few comments below

mao-sz added 3 commits May 31, 2025 01:13
Content to be covered in a later planned lesson.
Closer parallel with sessions example, only omitting DB query for session
@mao-sz mao-sz force-pushed the node-revamp-jwt branch from 7f8ab31 to b546d37 Compare May 31, 2025 00:32
@mao-sz mao-sz requested a review from 01zulfi May 31, 2025 00:33
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.

🔥

@mao-sz mao-sz requested a review from 01zulfi June 28, 2025 22:23
@mao-sz
Copy link
Contributor Author

mao-sz commented Jun 28, 2025

@01zulfi Just realised with the caveats section gone, there's nothing about logging out with stateless auth. Added a little bit about logging out but leaving the caveat details for the comparison lesson. This little bit should be sufficient and allow the learner to figure out what code they might need based on the mechanism.

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.

nice catch

jwt.io now has a slightly different decoder/encoder interface.
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: JSON Web Tokens

3 participants