{
    "componentChunkName": "component---src-templates-blog-post-js",
    "path": "/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-10/",
    "result": {"data":{"markdownRemark":{"html":"<h6 id=\"this-blog-post-is-part-of-a-series-you-must-finish-part-1-part-2-part-3-part-4-part-5-part-6-part-7-part-8--part-9-before-continuing-here\" style=\"position:relative;\"><a href=\"#this-blog-post-is-part-of-a-series-you-must-finish-part-1-part-2-part-3-part-4-part-5-part-6-part-7-part-8--part-9-before-continuing-here\" aria-label=\"this blog post is part of a series you must finish part 1 part 2 part 3 part 4 part 5 part 6 part 7 part 8  part 9 before continuing here permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>This blog post is part of a series. You must finish <a href=\"https://hemanta.io/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-1/\">part-1</a>, <a href=\"https://hemanta.io/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-2/\">part-2</a>, <a href=\"https://hemanta.io/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-3/\">part-3</a>, <a href=\"https://hemanta.io/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-4/\">part-4</a>, <a href=\"https://hemanta.io/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-5/\">part-5</a>, <a href=\"https://hemanta.io/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-6/\">part-6</a>, <a href=\"https://hemanta.io/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-7/\">part-7</a>, <a href=\"https://hemanta.io/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-8/\">part-8</a> &#x26; <a href=\"https://hemanta.io/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-9/\">part-9</a> before continuing here.</h6>\n<h3 id=\"proxying-api-requests-in-react\" style=\"position:relative;\"><a href=\"#proxying-api-requests-in-react\" aria-label=\"proxying api requests in react permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Proxying API requests in React</h3>\n<p>In our application, the client server runs at <del>localhost:3000</del> while our Express server runs at <del>localhost:5000</del>. In order to avoid CORS error during client-server interaction, we will proxy our API requests from React using a library named <del>http-proxy-middleware</del>.</p>\n<p>Install <del>http-proxy-middleware</del> using npm.</p>\n<pre class=\"grvsc-container synthwave-84\" data-language=\"sh\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"grvsc-source\"><span class=\"mtk1\">PS C:</span><span class=\"mtk6\">\\U</span><span class=\"mtk1\">sers</span><span class=\"mtk6\">\\D</span><span class=\"mtk1\">elhivery</span><span class=\"mtk6\">\\D</span><span class=\"mtk1\">esktop</span><span class=\"mtk6\">\\m</span><span class=\"mtk1\">ern-auth</span><span class=\"mtk6\">\\c</span><span class=\"mtk1\">lient</span><span class=\"mtk10\">&gt;</span><span class=\"mtk1\"> npm i http-proxy-middleware</span></span></span></code></pre>\n<p>Then, create a file named <del>setupProxy.js</del> inside the <del>src</del> folder. There is no need to import this file anywhere. CRA (Create React App) looks for a file by this name and loads it.</p>\n<p>We add proxies to the <del>setupProxy.js</del> file as shown below. Note that I have added all the routes that we need in our application.</p>\n<div class=\"gatsby-code-title\">client/src/setupproxy.js</div>\n<pre class=\"grvsc-container synthwave-84\" data-language=\"js\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"1\"></span><span class=\"grvsc-source\"><span class=\"mtk10\">const</span><span class=\"mtk1\"> { </span><span class=\"mtk3\">createProxyMiddleware</span><span class=\"mtk1\"> } </span><span class=\"mtk12\">=</span><span class=\"mtk1\"> </span><span class=\"mtk6\">require</span><span class=\"mtk1\">(</span><span class=\"mtk16\">&quot;http-proxy-middleware&quot;</span><span class=\"mtk1\">)</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"2\"></span><span class=\"grvsc-source\"><span class=\"mtk9\">module</span><span class=\"mtk1\">.</span><span class=\"mtk9\">exports</span><span class=\"mtk1\"> </span><span class=\"mtk12\">=</span><span class=\"mtk1\"> </span><span class=\"mtk10\">function</span><span class=\"mtk1\"> (</span><span class=\"mtk3 mtki\">app</span><span class=\"mtk1\">) {</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"3\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">  </span><span class=\"mtk3\">app</span><span class=\"mtk1\">.</span><span class=\"mtk6\">use</span><span class=\"mtk1\">(</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"4\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">    [</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"5\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">      </span><span class=\"mtk16\">&quot;/api/users/login&quot;</span><span class=\"mtk1\">,</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"6\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">      </span><span class=\"mtk16\">&quot;/api/users/register&quot;</span><span class=\"mtk1\">,</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"7\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">      </span><span class=\"mtk16\">&quot;/account/password/forgot&quot;</span><span class=\"mtk1\">,</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"8\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">      </span><span class=\"mtk16\">&quot;/account/password/reset/:token&quot;</span><span class=\"mtk1\">,</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"9\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">    ],</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"10\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">    </span><span class=\"mtk6\">createProxyMiddleware</span><span class=\"mtk1\">({</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"11\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">      </span><span class=\"mtk3\">target</span><span class=\"mtk14\">:</span><span class=\"mtk1\"> </span><span class=\"mtk16\">&quot;http://localhost:5000&quot;</span><span class=\"mtk1\">,</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"12\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">    })</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"13\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">  )</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"14\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">}</span></span></span></code></pre>\n<p>Anytime we make a change to the <del>setupProxy.js</del> file, we need to restart the server.</p>\n<h3 id=\"testing-user-registration\" style=\"position:relative;\"><a href=\"#testing-user-registration\" aria-label=\"testing user registration permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Testing user registration</h3>\n<p>We are now ready to test our user registration feature. Go ahead and fill the registration form and click on the <del>Register</del> button. You will be directed to the login page.</p>\n<blockquote>\n<p><strong>Note:</strong> Our user registration feature implementation is such that we direct the user to the login page upon successful registration. There is one more possibility - you might decide to directly log the user in after successful registration. The choice is yours.\nAfter we are done with implementing the login feature, you should have enough knowledge to implement this option.</p>\n</blockquote>\n<p>I have installed Redux DevTools as a browser extension in Chrome. Open Chrome DevTools and click on the <strong>Redux</strong> tab. Then click on the <strong>State</strong> tab. You will see the global Redux store. As you can see, the user registration is successful.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 545px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/6f29bf8e449009cf9f54da5d3ced54f9/f2ede/registerUser.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 83%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAIAAABSJhvpAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAClElEQVQ4y42R124TURCG92Ugjr3r7b03b6+2t5o4RUQWCCGUG3hOSqw4icsmeQ7wLkrCRQDp0+ifOfPP0ZkDrFbXm+121zSXy+V6s2mau9Xq+v7+Yb3Z3t7cPKyvv3/9tru5ututd8ur5vb2x+Vyu93tdk3T3AFeXPlJ7cbVtH47P/swKc/ssNgX09qLSzeqNK+yw6qeL2Yn76v5wk9qL668pPbTGYBQKkwqICaRgsUrHsYaICZBuDQkZAiXIVyC90IiuBEre7TkgKiI0jorOwipAqaTYpQKYSKI8H2YA1EBwsQn0BZMHCD8AOYGMIcQsm4n4bgiGA0w3RREhT7M7Y9bOg2iwmOlS9s2nmB1y5+YToIzOqCNIlEL1FGsW4msB4oZWd6UV9wBwsOEPMSl50CYSHLGyB07QUZyJqCZESc7ou5LesArrqDuhaQHQ1watLc9p5vohJkX5TijARRnoJSCMxrBahiloi04rXUreHxOp7uUYHWKMyBMBF71qQOQ7uhBdA9iehBzANKHQ7bjAHxK+zB3OGS7hh7EApNiHqRVkJQd/p4iTCvLnxh2OnLHs/n5bH7uBFPTSXUraWM8clI3zIDjs3fT4jivT7PyZJzP8/o0r0+n7cQwrcO0+njx+dPFlyQ7csPcDrIgLS1v4sfFOH8DiGpA8yYn2dPy+Ohk4ceFF+VvThaT/MiP8zAtvChzwyxIiiApw7Tcizb6cQFgjI4QMkapppP6UaEYgaz7XpQbdiJpnqz7fwGAeWfIjnBa68Psa5DqI+xeDKgexDzu7CUAhLMQ3sYYA6ZlUpIYRcRZvg//8T0vAcCshSkhIrik4BCMgWAChzKDf9l+myFSG5IqTEgUqaCY2IPZw/9z/jL/BCxgHxpjF4+VAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Successful user registration\"\n        title=\"Successful user registration\"\n        src=\"/static/6f29bf8e449009cf9f54da5d3ced54f9/f2ede/registerUser.png\"\n        srcset=\"/static/6f29bf8e449009cf9f54da5d3ced54f9/56d15/registerUser.png 200w,\n/static/6f29bf8e449009cf9f54da5d3ced54f9/d9f49/registerUser.png 400w,\n/static/6f29bf8e449009cf9f54da5d3ced54f9/f2ede/registerUser.png 545w\"\n        sizes=\"(max-width: 545px) 100vw, 545px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>If you click on the <strong>Action</strong> tab, you will see the actions types generated by the <del>userRegister</del> thunk.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 544px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/95b260e87b35c5ef7ec20b9899df0c73/cfd82/actionTypes.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 84.5%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAIAAABSJhvpAAAACXBIWXMAAA7DAAAOwwHHb6hkAAACzUlEQVQ4y3WSa2/aSBSG/V9WSePreGxsY8+Mr2B8jwGnGEgLOE3C7jaBqFupqpT/2kYQKaSlWWm3nytgRbWRKj169R5pjs5lDrVarRaLxXq9fnh4WC6XO/P4+Pj45evnu8X66e9v6/U//37/tlwuPy8+3X+9v1/e3d09PT2tVitqfH49Pr+uLmfVxezq5uPNX7eTi9nozdt+NW8Pr4Zn87PpvLqc//72/ezd7dW72/M/bsbnV5OLWXU5pxgRcxKhAWIloluxioP/QogEmTDAoAE6EnShZmkkrFsRJ5tHAEHNFWoWZbqJ5aVANgWJsCLitjmCbPIS+R8Qs6LBAoODuE5ax8UpcSLKj7vEiWleZ4CxgxZ0WtBZET2Dg3iHF+RhcoLsiDLM0PVz5MReq201MtNLHT9vhF2gWJxEeNl8BicR003C9CW2I6pOAruZ6WZoNVPsxMiOiJvazUzDPgt+VtvDAGQ3s6wzwE5EQdVRdE9UbEX3JM2VVEdUbUlzoGIzwGBFtB9nPxRUbQ01oWJTB4zyG107ZNUDRjlk1R0HjHrIajtD8/puC3uO+PoBo77g6lTn5euiP047/bTdTzv9bGfa/bw4PR1PJ2/+TPKyEbS9VrsVF+5mHR3HP/bDjh91qdfV9NVkelKOesOqKEdFOSpPz076496wur758P7D7clgkrb7UdrLOgM/LrLuRpO8n3UGFJAt00uhanut9qvxtDeoWnHR7Y2Ho8sgKYKkiI/LJC+37Ww0ycttd2WalxQNDLnuciLSTT9MCz/KiRt6wXGQdC0vthqx5UXEibCzVfunbo5EqPsiakHFkXQsGQZQ9RrBUDfEug51VCNIRogBz3e2gxL0pmimEg6AbLLQ4KXNVW+MjBjRoPkNz35rD8UpLiSxhIKa5kKNyAiLGoY6Vgjm4PaR+OtkXmsIii3IBMiYBcYRb9DCll8X3Cf/ALLFJVJdjsLzAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Action Types\"\n        title=\"Action Types\"\n        src=\"/static/95b260e87b35c5ef7ec20b9899df0c73/cfd82/actionTypes.png\"\n        srcset=\"/static/95b260e87b35c5ef7ec20b9899df0c73/56d15/actionTypes.png 200w,\n/static/95b260e87b35c5ef7ec20b9899df0c73/d9f49/actionTypes.png 400w,\n/static/95b260e87b35c5ef7ec20b9899df0c73/cfd82/actionTypes.png 544w\"\n        sizes=\"(max-width: 544px) 100vw, 544px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Login to your MongoDB Atlas account. If you check the database, you should see a new document inside the <del>users</del> collection. You would also notice that the password saved in the database is hashed.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 690px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/9937d12c22364e2dd92a8e3dad31c04f/97114/hashedPassword.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 58.50000000000001%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAIAAADtbgqsAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABOElEQVQoz42R624cIQyF5/0fMYqaRJ0Z7c4GMBgbjLlUzCpK1W6UHH0/fNGBI3nZ9v16HOu2rdv2e11LKePHWojIhxAwAngHrpSiqiJST0mZqqoxxtbav+ZrsqWplgIAvfeUEgD4EMB75xwzq6q1zlo73xKZPwX0hNrqEjhSSpEZ42cRPkCiyBwQQ4xzRTTnZ4vMSyTyiMRMKfFp5pyllDtZJIv8X9/bBWO0ACnn+46Ys0hR/QmLcc4AWPCHMYcxkRPOeDPhtyx8ppWcmSgx5VMyc3wm/IpljJFyhssq9pasGWhGtMPfRqbv7zzGcADPL68vh3/awVOR0nofk9Z766P1Vlttrff+wIyI78Zg5Jt1r8f269g3e1ntZXPHaq9v77sLniKp1gfmv1VH1Q/qaLXXMrSP/jD2H62QuHmgAnruAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"user document in the database\"\n        title=\"user document in the database\"\n        src=\"/static/9937d12c22364e2dd92a8e3dad31c04f/97114/hashedPassword.png\"\n        srcset=\"/static/9937d12c22364e2dd92a8e3dad31c04f/56d15/hashedPassword.png 200w,\n/static/9937d12c22364e2dd92a8e3dad31c04f/d9f49/hashedPassword.png 400w,\n/static/9937d12c22364e2dd92a8e3dad31c04f/97114/hashedPassword.png 690w\"\n        sizes=\"(max-width: 690px) 100vw, 690px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Great. User registration is working as expected. Note that we have not tested the scenario wherein the user tries to register for the second time using the same email address he/she used to register the first time. In such a scenario, we will display the error message received from the server (<em>User already registered</em>) on top of the registration form. We will test this case after we finish the implementation of the user login feature.</p>\n<p>Go to <a href=\"https://hemanta.io/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-11/\">part-11</a></p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    position: relative;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n    line-height: 1.4;\n  }\n  \n  .grvsc-code {\n    display: table;\n  }\n  \n  .grvsc-line {\n    display: table-row;\n    box-sizing: border-box;\n    width: 100%;\n    position: relative;\n  }\n  \n  .grvsc-line > * {\n    position: relative;\n  }\n  \n  .grvsc-gutter-pad {\n    display: table-cell;\n    padding-left: 0.75rem;\n    padding-left: calc(var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem)) / 2);\n  }\n  \n  .grvsc-gutter {\n    display: table-cell;\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    user-select: none;\n  }\n  \n  .grvsc-gutter::before {\n    content: attr(data-content);\n  }\n  \n  .grvsc-source {\n    display: table-cell;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-source:empty::after {\n    content: ' ';\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    user-select: none;\n  }\n  \n  .grvsc-gutter + .grvsc-source {\n    padding-left: 0.75rem;\n    padding-left: calc(var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem)) / 2);\n  }\n  \n  /* Line transformer styles */\n  \n  .grvsc-has-line-highlighting > .grvsc-code > .grvsc-line::before {\n    content: ' ';\n    position: absolute;\n    width: 100%;\n  }\n  \n  .grvsc-line-diff-add::before {\n    background-color: var(--grvsc-line-diff-add-background-color, rgba(0, 255, 60, 0.2));\n  }\n  \n  .grvsc-line-diff-del::before {\n    background-color: var(--grvsc-line-diff-del-background-color, rgba(255, 0, 20, 0.2));\n  }\n  \n  .grvsc-line-number {\n    padding: 0 2px;\n    text-align: right;\n    opacity: 0.7;\n  }\n  \n  .synthwave-84 { background-color: #262335; }\n  .synthwave-84 .mtki { font-style: italic; }\n  .synthwave-84 .mtk1 { color: #FFFFFF; }\n  .synthwave-84 .mtk6 { color: #36F9F6; }\n  .synthwave-84 .mtk10 { color: #FEDE5D; }\n  .synthwave-84 .mtk3 { color: #FF7EDB; }\n  .synthwave-84 .mtk12 { color: #FFFFFFEE; }\n  .synthwave-84 .mtk16 { color: #FF8B39; }\n  .synthwave-84 .mtk9 { color: #FE4450; }\n  .synthwave-84 .mtk14 { color: #B6B1B1; }\n  .synthwave-84 .grvsc-line-highlighted::before {\n    background-color: var(--grvsc-line-highlighted-background-color, rgba(255, 255, 255, 0.1));\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, rgba(255, 255, 255, 0.5));\n  }\n</style>","frontmatter":{"title":"Implement JWT Based User Authentication in a MERN Stack App - Part 10","date":"2021-05-23"}}},"pageContext":{"slug":"/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-10/","prev":{"fields":{"slug":"/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-12/"},"frontmatter":{"modules":null}},"next":{"fields":{"slug":"/implement-jwt-based-user-authentication-in-a-mern-stack-app-part-11/"},"frontmatter":{"modules":null}}}},
    "staticQueryHashes": ["3159585216"]}