<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Manitharun Reddy Thallapureddy on Medium]]></title>
        <description><![CDATA[Stories by Manitharun Reddy Thallapureddy on Medium]]></description>
        <link>https://medium.com/@manitharunreddy?source=rss-24c9a1ab0207------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*c-L3Qg_fHmG94kzR</url>
            <title>Stories by Manitharun Reddy Thallapureddy on Medium</title>
            <link>https://medium.com/@manitharunreddy?source=rss-24c9a1ab0207------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 15:12:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manitharunreddy/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Key to Secure Authentication : Understanding JWT Tokens]]></title>
            <link>https://manitharunreddy.medium.com/a-key-to-secure-authentication-understanding-jwt-tokens-862bbe013beb?source=rss-24c9a1ab0207------2</link>
            <guid isPermaLink="false">https://medium.com/p/862bbe013beb</guid>
            <category><![CDATA[mern-stack-development]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[node-js-development]]></category>
            <category><![CDATA[express]]></category>
            <dc:creator><![CDATA[Manitharun Reddy Thallapureddy]]></dc:creator>
            <pubDate>Mon, 10 Jul 2023 18:57:53 GMT</pubDate>
            <atom:updated>2023-07-10T18:57:53.847Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Key to Secure Authentication : Understanding JWT Tokens</h3><p>JWT (JSON Web Token) is a widely used open standard for creating secure authentication tokens. It enables the transmission of information between parties as a digitally signed and encrypted compact string we can’t send password and username for every request .</p><p>If we send like this or made this it makes the user credentials or user data visible for the enthusiastic people who try to steal your data .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*WdjyXPARHGmW355jDFtSUw.png" /></figure><p>When the user login we just generate a token .JWT is a self-contained token consisting of three parts: a header, a payload, and a signature.</p><p>How to generate token :</p><pre>npm i jsonwebtoken //install the package in package</pre><pre>var jwt = require(&#39;jsonwebtoken&#39;);<br><br>const token = jwt.sign(data, secretKey, { algorithm, expiresIn: expiryTime });<br> /* where data is what you want to get after verification<br>  * secretkey is used while verificating the data<br>  * algorithm is by which you can convert the data into some string<br>  * expiryTime is at what time after you want to make expiry the token<br> */<br><br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*3o27GnTTJlJGBmsHr8kFmA.png" /><figcaption><strong>Algorithms supported by jwt web token package</strong></figcaption></figure><p>How to verify the token :</p><pre>const jwt = require(&#39;jsonwebtoken&#39;);<br><br>const token = &#39;your_jwt_token&#39;; // The JWT token to verify<br>const secretKey = &#39;your_secret_key&#39;; // The secret key used to sign or generate the token<br><br>try {<br>  const decoded = jwt.verify(token, secretKey);<br>  console.log(&#39;Decoded JWT payload:&#39;, decoded);<br>} catch (error) {<br>  console.error(&#39;JWT verification failed:&#39;, error.message);<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=862bbe013beb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bcrypt Must and Should use Package]]></title>
            <link>https://manitharunreddy.medium.com/bcrypt-must-and-should-use-package-bc5cd10aabba?source=rss-24c9a1ab0207------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc5cd10aabba</guid>
            <category><![CDATA[bycrypt]]></category>
            <category><![CDATA[passswordhashing]]></category>
            <dc:creator><![CDATA[Manitharun Reddy Thallapureddy]]></dc:creator>
            <pubDate>Mon, 03 Jul 2023 18:14:55 GMT</pubDate>
            <atom:updated>2023-07-03T18:20:20.758Z</atom:updated>
            <content:encoded><![CDATA[<p>Many of new dev’s just store the passwords of users as it is in our databases !</p><p>That’s not a good idea when you want your users data <strong>compromised </strong>over some enthusiastic people who try to use their accounts and steal their data.</p><blockquote>One common mistake made by developers .</blockquote><ol><li><strong>Understanding the Need for Password Hashing</strong>: Passwords are a critical component of user authentication and authorization systems. Storing passwords in plain text or using weak encryption methods leaves user accounts vulnerable to security breaches. It is essential to protect passwords by hashing them, which is a one-way transformation that converts the password into an irreversible string of characters.</li></ol><h4>How To Use Bycrypt :</h4><blockquote>Step 1: Install the package [ cmd ] : npm i bcrypt or npm install bcrypt</blockquote><pre>import bycrypt from &quot;bycrypt&quot;  // If you write old pattern then &quot;const bcrypt = require(&#39;bcrypt&#39;);&quot;<br><br>const saltRounds =10; <br><br>myPlaintextPassword=&quot;manitharunreddy&quot;<br><br>/*<br>The number of salt rounds indicates how many times the password <br>and salt combination will be hashed in a loop. <br>*/<br><br>const hashedpassword = bcrypt.hashSync(myPlaintextPassword, saltRounds);<br><br>// hashedPassword is where you store .<br></pre><p>When hashing passwords with Bcrypt, a random salt is generated and combined with the password before hashing. The salt is a random value that is unique for each password, preventing attackers from using precomputed tables (rainbow tables) to quickly crack multiple hashed passwords.</p><blockquote>When User want login how to check the user entered passsword is what we hashed or not ?</blockquote><pre><br>//use login function<br><br>let hashedPassword =&quot;s0/#%4^^DF%^U&amp;R\/\P4$$w0rD&quot; //which you get from database<br><br>bcrypt.compareSync(myPlaintextPassword, hash); // true<br>bcrypt.compareSync(someOtherPlaintextPassword, hash); // false<br><br>/*<br>myPlaintextPassword is what he entered while registered then<br> it returns true<br>else return false<br>*/<br><br></pre><p><a href="https://www.npmjs.com/package/bcrypt">bcrypt</a></p><p>check above link for more details about this package .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc5cd10aabba" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>