DEV Community

How JWT works in Authorization

tarekibnkhayer on November 02, 2023

What is JWT (JSON Web Token)? JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between tw...
Collapse
 
schemetastic profile image
Rodrigo Isaias Calix

Hello!

Interesting article! What do you think about storing tokens using Service Workers in JS?

Oh, and BTW, you can do code highlighting by placing the name of the language after the initial 3 backticks when opening a code block. e.g. ```js, ```css
And you could make your code more readable by tabulating (or adding spaces to) it. For example:

function myFunction(){
    // function with spaces in the new lines
    let sum = {
        a: 4,
        b: 3
    }
    return (sum.a + sum.b)
}
Enter fullscreen mode Exit fullscreen mode

Welcome to the DEV community! As you keep writing, you'll get better and better.

Collapse
 
tarekibnkhayer profile image
tarekibnkhayer

I don't know about Service Workers in JS, Right Now. But I will definitely explore it. Thanks for sharing it and also, I am very glad that you give me suggestion about code highlighting technique. Thank you very much for your suggestions.

Collapse
 
schemetastic profile image
Rodrigo Isaias Calix

Okay, Service workers run in a different thread in the browser, e.g. if you open the browsers console and write a JS code, you have access to the DOM, but you can't access Web Workers and Service Worker scripts, still then I wouldn't recommend those for storing certain sensitive data such as passwords, that's why I was asking you that, but it's fine, I'll send you some helpful link:

Hope this helps, welcome!