-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is a JWT #23
Comments
From SEO point of view, be sure to write about:
I think one good way to do this would be to add a section on "common problems with JWT" or something similar, and then list these as h2 or h3s Overall outline: https://docs.google.com/document/d/1vE3x1myMvBY1GyYXg2TD0RB3ZM1LnyiqoOL29YsOhcQ/edit# |
Example of a JWT's creation, signing and verification process1) Create a JSONLet's take the following JSON: {
"userId": "abcd123",
"expiry": 1646635611301
} Notice that we have also added an 2) Create a JWT signing key and decide the signing algorithmFirst, we need a signing key and an algorithm to use. We can generate a signing key using any secure random source. For the purpose of this post, let's use:
3) Creating the "Header"This contains the information about which signing algorithm is used. Like the payload, this is a also a JSON and will be appended to the start of the JWT (hence the name header): {
"typ": "JWT",
"alg": "HS256"
} 4) Create a signature
5) Creating the JWTFinally, we append the generated secret like
6) Verifying the JWTOnce the client sends the JWT back to the server, the server does the following steps:
We can trust the incoming JWT only if it passes all of the checks above.
|
Checklist
Define the outcome (value) that the post will have for the reader (i.e. what will they learn or gain)
Who is it for? (i.e. someone building auth - junior / senior, previous knowledge required etc, specific tech stacks)
Level of depth on the topic
Define real world application / relevance. Why is this topic important?
Writing the post
Define article title
Define meta title, meta description, meta image tags (for social)
Define meta title, meta description, meta image tags (for SEO)
Proof read
Adding title meta
Adding description meta
Adding OG meta
Added analytics for the following events to
main-website
page_blog_article
page_blog_lastsection_markasdone
page_blog_discord_article
Adding to sitemap.xml
Release on test
Check for SEO (via SEO agent)
Release to prod
Clone the blog on
Distribute on
The text was updated successfully, but these errors were encountered: