<?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 Atharva Gulhane on Medium]]></title>
        <description><![CDATA[Stories by Atharva Gulhane on Medium]]></description>
        <link>https://medium.com/@atharva1610?source=rss-750427617fc9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZRrsabHu1CehaFg84ADa6Q.jpeg</url>
            <title>Stories by Atharva Gulhane on Medium</title>
            <link>https://medium.com/@atharva1610?source=rss-750427617fc9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 05:49:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@atharva1610/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[Beyond the Exam: Benefits of AWS Cloud Practitioner Certification]]></title>
            <link>https://atharva1610.medium.com/beyond-the-exam-benefits-of-aws-cloud-practitioner-certification-fb5a7ad2d5db?source=rss-750427617fc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb5a7ad2d5db</guid>
            <category><![CDATA[benefits]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-cloud-practitioner]]></category>
            <dc:creator><![CDATA[Atharva Gulhane]]></dc:creator>
            <pubDate>Tue, 22 Aug 2023 11:32:22 GMT</pubDate>
            <atom:updated>2023-08-22T11:32:22.234Z</atom:updated>
            <content:encoded><![CDATA[<p>Congratulations! You’ve successfully earned your AWS Cloud Practitioner certification. But the benefits of this certification go beyond just adding a line to your resume. Let’s explore how this certification can positively impact your career and professional development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*XUTrZ_38ImmqQ5gacNqA0A.png" /></figure><p><strong>1. Credibility and Recognition:</strong> Being certified by AWS adds credibility to your profile. Employers recognize AWS certifications as a validation of your knowledge and skills in cloud computing. It can set you apart in a competitive job market.</p><p><strong>2. Career Opportunities: </strong>The AWS Cloud Practitioner certification opens the door to various entry-level cloud-related roles, such as cloud support associate, junior cloud developer, and cloud solutions architect. These roles can be a stepping stone for more advanced cloud certifications.</p><p><strong>3. Learning Path: </strong>While preparing for the certification, you’ve gained a strong foundation in AWS services and concepts. This knowledge can serve as a solid starting point for further learning and specialization within the AWS ecosystem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C7hLXxy72_G0fkHB.png" /></figure><p><strong>4. Business Decision-Making:</strong> The AWS Cloud Practitioner certification isn’t just for technical professionals. Business executives and managers can benefit from understanding AWS fundamentals to make informed decisions about cloud adoption and migration strategies.</p><p><strong>5. Confidence Boost:</strong> Earning certification requires dedication and hard work. Successfully passing the exam can boost your self-confidence and motivate you to pursue more advanced certifications.</p><p><strong>6. Networking Opportunities:</strong> As part of your certification journey, you may have connected with other aspiring cloud practitioners. Networking within the AWS community can lead to valuable connections, collaborations, and insights.</p><p><strong>7. Path to Advanced Certifications:</strong> If you’re considering pursuing more advanced AWS certifications, such as those for specific roles like solutions architect, developer, or sysops administrator, the Cloud Practitioner certification provides a strong foundation for your studies.</p><p><strong>8. Continuous Learning:</strong> AWS services and the cloud computing landscape are constantly evolving. Holding a certification encourages you to stay updated with industry trends and new AWS offerings.</p><p>In conclusion, the AWS Cloud Practitioner certification is more than just a checkbox; it’s a stepping stone that can elevate your career and open doors to exciting opportunities. As you continue your cloud journey, consider exploring more advanced certifications that align with your career goals. <br>Keep learning, adapting, and growing within the dynamic world of cloud computing.</p><p><em>Congratulations again, and best of luck on your future endeavors!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb5a7ad2d5db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tips for Acing the AWS Cloud Practitioner Certification Exam]]></title>
            <link>https://atharva1610.medium.com/tips-for-acing-the-aws-cloud-practitioner-certification-exam-3ed7a8874381?source=rss-750427617fc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ed7a8874381</guid>
            <category><![CDATA[aws-cloud-practitioner]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[resources]]></category>
            <dc:creator><![CDATA[Atharva Gulhane]]></dc:creator>
            <pubDate>Tue, 22 Aug 2023 04:32:40 GMT</pubDate>
            <atom:updated>2023-08-22T04:32:40.321Z</atom:updated>
            <content:encoded><![CDATA[<p>With a solid understanding of the key concepts covered in the AWS Cloud Practitioner certification, it’s time to focus on exam-taking strategies and additional resources that can boost your chances of success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t9mYmcytFMy7PGCwEhq9tA.png" /></figure><p><strong>1. Time Management:</strong> The AWS Cloud Practitioner exam has a time limit, so managing your time is crucial. Each question carries the same weight, so avoid spending too much time on a single question. If you’re unsure about an answer, flag it and move on. You can revisit flagged questions later.</p><p><strong>2. Read Carefully: </strong>Pay close attention to the wording of questions. Sometimes, small details in the phrasing can significantly affect the correct answer.</p><p><strong>3. Process of Elimination: </strong>If you’re unsure about an answer, use the process of elimination to eliminate obviously incorrect options. This increases your odds of choosing the correct answer even if you’re unsure.</p><p><strong>4. Focus on the Essentials: </strong>While studying, prioritize the core services and concepts that the exam focuses on. Don’t spend too much time on advanced topics that are beyond the scope of the certification.</p><p><strong>5. Hands-on Experience:</strong> Where possible, get hands-on experience with AWS services. AWS offers a free tier that allows you to experiment with various services, helping you solidify your understanding.</p><p><strong>6. Practice Exams: </strong>Utilize practice exams to simulate the actual test-taking experience. This can help you familiarize yourself with the question format and time constraints.</p><p><strong>7. Review Whitepapers and Documentation:</strong> AWS provides detailed whitepapers and documentation on various topics. These resources can be immensely helpful in reinforcing your knowledge and understanding of key concepts.</p><p><strong>8. Stay Calm and Confident:</strong> Exam stress is common, but try to remain calm and confident. Remember that you’ve put in the effort to prepare, and you’re well-equipped to tackle the questions.</p><h4>Additional Resources</h4><ol><li><strong>AWS Whitepapers:</strong> AWS offers whitepapers on various topics, such as the Well-Architected Framework, security best practices, and more.</li><li><strong>AWS Training:</strong> Consider enrolling in AWS training courses, either in-person or online. These courses provide structured learning and often include hands-on labs.</li><li><strong>Online Communities:</strong> Join AWS-focused forums and communities to interact with others preparing for the exam. You can share tips, ask questions, and learn from others’ experiences.</li></ol><p>Remember, the AWS Cloud Practitioner certification is designed to validate your foundational knowledge of AWS. Approach the exam with confidence, and you’ll be well on your way to becoming a certified cloud practitioner. Good luck!</p><p><em>In our next blog post, we’ll discuss the benefits of the AWS Cloud Practitioner certification beyond just passing the exam.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ed7a8874381" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Key Concepts Covered in AWS Cloud Practitioner Certification]]></title>
            <link>https://atharva1610.medium.com/key-concepts-covered-in-aws-cloud-practitioner-certification-f9b4b5050bc9?source=rss-750427617fc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9b4b5050bc9</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws-certification]]></category>
            <category><![CDATA[cloud-practitioner]]></category>
            <dc:creator><![CDATA[Atharva Gulhane]]></dc:creator>
            <pubDate>Mon, 21 Aug 2023 11:31:01 GMT</pubDate>
            <atom:updated>2023-08-21T11:31:01.582Z</atom:updated>
            <content:encoded><![CDATA[<p>Continuing our journey into the AWS Cloud Practitioner certification, let’s explore some of the key concepts you’ll encounter on the exam. These concepts form the foundation of AWS cloud computing and are essential for anyone entering the world of cloud technology.</p><h4><strong>AWS Global Infrastructure</strong></h4><p>Understanding how AWS is structured globally is crucial. You’ll learn about AWS Regions (geographical areas), Availability Zones (isolated data centers), and how they provide high availability and fault tolerance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZNGbyjOLjITGYPQe" /></figure><h4><strong>AWS Services: Familiarize yourself with essential AWS services</strong></h4><ul><li><strong>Amazon EC2:</strong> Elastic Compute Cloud provides scalable compute capacity in the cloud.</li><li><strong>Amazon S3:</strong> Simple Storage Service is used for scalable object storage.</li><li><strong>Amazon RDS:</strong> Relational Database Service offers managed relational databases.</li><li><strong>Amazon IAM:</strong> Identity and Access Management helps control access to AWS resources.</li><li><strong>Amazon VPC:</strong> Virtual Private Cloud allows you to create isolated networks within AWS.</li><li><strong>Amazon CloudWatch:</strong> Monitoring and observability service that collects and tracks metrics, events, and logs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*kGwb_fV8l6wr1XSu" /></figure><h4><strong>AWS Pricing and Billing</strong></h4><p>Understand AWS pricing models, such as on-demand, reserved, and spot instances. Learn about factors affecting costs, like data transfer and storage.</p><h4><strong>Security and Compliance</strong></h4><p>Gain insight into AWS security best practices and compliance measures. Understand the shared responsibility model and how both AWS and customers contribute to security.</p><h4><strong>AWS Well-Architected Framework</strong></h4><p>Discover the five pillars of a well-architected framework: operational excellence, security, reliability, performance efficiency, and cost optimization. These principles guide architects in building reliable and scalable systems on AWS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/0*QKoPQxsBoH-ghrtg.png" /></figure><h4><strong>AWS Support Plans</strong></h4><p>Learn about AWS support plans and how they offer different levels of technical assistance, including access to AWS Trusted Advisor for optimizing your infrastructure.</p><h4><strong>AWS Cloud Adoption Framework</strong></h4><p>Understand the phases of the AWS Cloud Adoption Framework, which provides guidance on cloud adoption strategies and best practices for organizations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/0*DPAhXPb2yzf9RXIA.png" /></figure><h4><strong>Basic Cloud Concepts</strong></h4><p>Grasp foundational cloud concepts such as elasticity, scalability, agility, and disaster recovery.</p><p>As you prepare for the AWS Cloud Practitioner certification exam, make sure to delve into each of these areas. Remember, this certification is not just about memorizing terms but understanding how they fit into the broader context of cloud computing.</p><p><em>In our next blog post, we’ll discuss exam-taking strategies and provide some additional resources to help you succeed.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9b4b5050bc9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with AWS Cloud Practitioner Certification]]></title>
            <link>https://atharva1610.medium.com/getting-started-with-aws-cloud-practitioner-certification-6e04c6c03a38?source=rss-750427617fc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e04c6c03a38</guid>
            <category><![CDATA[cloud-practitioner]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws-certification]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Atharva Gulhane]]></dc:creator>
            <pubDate>Mon, 21 Aug 2023 06:03:54 GMT</pubDate>
            <atom:updated>2023-08-21T06:03:54.694Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*EYn8hWQG-brBfqcPzgfu6A.jpeg" /></figure><p>Are you looking to kickstart your journey into the world of cloud computing? The AWS Cloud Practitioner certification is the perfect starting point. This certification is designed for individuals with little to no prior experience with AWS but want to understand its fundamental concepts. Let’s dive into what the certification entails and why it’s a valuable asset in the tech industry.</p><h4><strong>What is AWS Cloud Practitioner Certification?</strong></h4><p>The AWS Certified Cloud Practitioner certification is an entry-level credential that validates your knowledge of the AWS Cloud. It covers the basic concepts, services, and benefits of using AWS. This certification is not just for technical professionals; business and sales executives can also benefit from understanding AWS fundamentals to make informed decisions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nzo9Y1NM2RyIHdvx.png" /></figure><h4><strong>Why Pursue AWS Cloud Practitioner Certification?</strong></h4><ol><li><strong>Foundational Knowledge:</strong> The certification provides a solid foundation in AWS cloud computing, enabling you to build upon this knowledge as you advance in your career.</li><li><strong>Versatility:</strong> Understanding cloud concepts and AWS services is becoming increasingly important in various job roles, from developers and system administrators to business analysts.</li><li><strong>Industry Recognition:</strong> AWS is one of the leading cloud service providers, and being certified by them adds credibility to your profile.</li><li><strong>Career Opportunities:</strong> Having the AWS Cloud Practitioner certification can open doors to entry-level positions in cloud-related roles.</li><li><strong>Preparation for Advanced Certifications:</strong> If you plan to pursue more advanced AWS certifications, this credential sets the stage by introducing you to key concepts.</li></ol><h4><strong>Exam Details and Preparation Tips:</strong></h4><p>The certification exam consists of multiple-choice questions and costs around $100 USD. To help you succeed, here are some preparation tips:</p><ol><li><strong>Understand AWS Global Infrastructure:</strong> Learn about AWS Regions, Availability Zones, and a global cloud network concept.</li><li><strong>Study AWS Services:</strong> Familiarize yourself with core AWS services such as EC2, S3, RDS, and IAM. Understand their purpose and use cases.</li><li><strong>Review Pricing and Billing:</strong> Know how AWS pricing works, the various pricing models, and cost management best practices.</li><li><strong>Whitepapers and Documentation:</strong> AWS provides a range of free resources, including whitepapers and documentation, which can be incredibly helpful for your studies.</li><li><strong>Practice Exams:</strong> Utilize practice exams to get a feel for the questions you’ll encounter and assess your readiness.</li></ol><h4>Study Resources:</h4><ol><li><a href="https://aws.amazon.com/training/classroom/aws-cloud-practitioner-essentials/">AWS Classroom(1 day virtual class)</a></li><li><a href="https://explore.skillbuilder.aws/learn/course/134/aws-cloud-practitioner-essentials">AWS Skill Builder (self-paced)</a></li><li>AWS Whitepapers: <a href="https://d0.awsstatic.com/whitepapers/aws-overview.pdf">Overview of Amazon Web Services</a>, <a href="http://d1.awsstatic.com/whitepapers/aws_pricing_overview.pdf">How AWS Pricing Works</a>, <a href="https://aws.amazon.com/premiumsupport/plans/">Compare AWS Support Plans</a></li><li><a href="https://www.udemy.com/course/aws-certified-cloud-practitioner-new/">Ultimate AWS Certified Cloud Practitioner CLF-C01 &amp; CLF-C02</a> -Stephane Maarek</li><li><a href="https://www.udemy.com/course/practice-exams-aws-certified-cloud-practitioner/">Practice Exams | AWS Certified Cloud Practitioner CLF-C01/02</a> — Stephane Maarek</li></ol><p><em>In the next blog post, we’ll delve deeper into specific topics covered in the AWS Cloud Practitioner certification exam. Stay tuned!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e04c6c03a38" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JP Morgan Chase & Co. On-Campus Internship Experience (SDE)]]></title>
            <link>https://atharva1610.medium.com/jp-morgan-chase-co-on-campus-internship-experience-sde-61d112713b31?source=rss-750427617fc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/61d112713b31</guid>
            <category><![CDATA[code-for-good]]></category>
            <category><![CDATA[internship-experience]]></category>
            <category><![CDATA[vit-vellore]]></category>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[jpmorgan-chase]]></category>
            <dc:creator><![CDATA[Atharva Gulhane]]></dc:creator>
            <pubDate>Wed, 03 Feb 2021 17:37:12 GMT</pubDate>
            <atom:updated>2021-02-03T17:37:12.028Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>My journey &amp; experience of participating and winning Code for Good 2020 and getting selected as a Summer Intern at JPMC</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*1y6M1CGLSP4x-_2E2d7FSQ.jpeg" /></figure><p><a href="https://www.jpmorganchase.com/"><strong>JPMC</strong></a><strong> </strong>visited our campus in Mid January 2020 (during 4th sem) for the role of <strong><em>Software Development Engineer(SDE)</em></strong>. Unlike other companies, JPMC has a different process for hiring summer interns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*I2CbMLBWaWsDOHZn_UUuNQ.jpeg" /></figure><p><strong>Initial Eligibility Criteria</strong></p><ol><li>70% and above in X and XII</li><li>7.0+ CGPA</li></ol><h4><strong>🔹Round 1: Coding Round (Mid January) round</strong></h4><p>Around 250 people were shortlisted for the test and the test was conducted on HackeRank Portal.</p><p>So the test comprised of :</p><ol><li>2 Coding Questions (Difficulty level: Easy to moderate)</li><li>MCQs on CSE subjects and Output based Questions</li></ol><p>So I felt the overall exam was of moderate difficulty.</p><blockquote><strong>90 people were shortlisted for the next round and I was one of them.</strong></blockquote><h4>🔹Round 2: Pre-Recorded Video Interview (Early Feb)</h4><p>This interview was taken on the <a href="https://www.hirevue.com/">HireVue</a> platform. It consisted of two 2 Behavioural/Situational Questions. The questions appeared on screen and 30 sec were given to prepare for the answer. After the 30 sec were over we had to record our responses.</p><blockquote><strong>50 people including me were selected for the next round.</strong></blockquote><h4>🔹Round 3: Code For Good Hackathon (postponed to August)</h4><p>So the final round is the CFG Hackathon which is a national-level hackathon. Generally, CFG takes place offline in JPMC offices, but due to Covid pandemic situations, ours was held online. Around 550 students from various universities who had been shortlisted from their respective colleges were participating. We had some exciting sessions for 2 days before the hack and we were later allotted teams by the organizers.</p><p><strong>📄 Problem Statement for the Hackathon</strong></p><p>So the problem statements for the hackathon were given to us by different NGOs to solve the problems that they were facing. We had to give a preference order for the problem statements. According to the first-come-first-serve basis, we were allotted our problem statement. I received the problem statement by <a href="https://sightandlife.org/"><strong>Sight and Life Organization</strong></a><strong> </strong>and it was mainly focused on data visualization. (<a href="https://res.cloudinary.com/ideation/image/upload/w_870/lviyxbiuzryxd5udkssm.pdf"><strong><em>Link to Problem statement</em></strong></a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*a7j9UnxFgPrKgu8Cna89gw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*P1W_ivA9eMN91mnq4V47Cg.jpeg" /></figure><p><strong>💻Our Pitch</strong></p><p><a href="https://drive.google.com/file/d/1oi4WYBW0j2scgHSM8DSDuyqRF0oM1xc-/view?usp=sharing">TEAM 3 PITCH.mp4</a></p><p><strong>🥇The Result</strong></p><p>The hackathon lasted for 12 hours and we were guided by two mentors that were overseeing our work for the whole duration of the hack. My mentors also took a short interview of me during the hack.</p><h4>Our team came 1st for the given problem statement and we received iPad 8th Gen as the prize<em>🥇</em>.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*crljEa9iI2nxdcSh9wdQXg.jpeg" /></figure><h4>A few weeks later, I received a mail that I have offered a summer internship at JPMC for 2 months 😃.</h4><blockquote>The whole journey throught the recruitment process was great experience for me. I got to know a lot of new people through CFG ,made new friends, and learnt a lot of things along the way. CFG was my first hackathon and winning it was awesome <em>😉</em>. I hope to win more hacks in the future and I am thankful to JPMC for providing me this opportunity<em>👌.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61d112713b31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Handling Authentication and Authorization in Node.js]]></title>
            <link>https://atharva1610.medium.com/handling-authentication-and-authorization-in-node-js-c9a34d8fc85f?source=rss-750427617fc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9a34d8fc85f</guid>
            <category><![CDATA[express]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[bcrypt]]></category>
            <dc:creator><![CDATA[Atharva Gulhane]]></dc:creator>
            <pubDate>Wed, 13 May 2020 14:53:30 GMT</pubDate>
            <atom:updated>2020-05-15T04:55:58.147Z</atom:updated>
            <content:encoded><![CDATA[<p>This article will help you understand how to setup basic Authentication and Authorization for your website using <a href="https://www.npmjs.com/package/bcryptjs"><strong><em>bcryptjs</em></strong></a> and <a href="https://www.npmjs.com/package/jsonwebtoken"><strong><em>JSON Web Token(JWT)</em></strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*gqj3ddNB0PGvecdQnnCudQ.png" /></figure><h3><strong>Introduction</strong></h3><h4><em>First of all what’s the difference between Authentication and Authorization?</em></h4><blockquote><strong>Authentication</strong> is a way to validate the identity of a registered user attempting to gain access to an application, API or any other data resource. In contrast, once you are authenticated, <strong>authorization</strong> is about deciding whether an individual is permitted to perform a given action on a specific resource.</blockquote><p>To protect sensitive information and to prevent our websites or applications from being compromised we need to authenticate and authorize a user. To do so we can follow the below steps:</p><h4>1) Setting up a the File Structure</h4><p>Set up the structure in your text editor like <a href="https://code.visualstudio.com/">VS Code</a> or <a href="https://www.sublimetext.com/">Sublime Text</a> as shown below.</p><pre>-/Auth<br>   -/models<br>      - user.js</pre><pre>   -/routes<br>      - auth.js<br>      - secret.js<br>      - verifyToken.js</pre><pre>   - app.js</pre><h4>2) Initialize npm and install required packages</h4><p>We will first initialize npm so we can track the dependencies our server has. The flag “-y” initializes npm with default parameters.</p><pre>npm init -y</pre><p>Now we will install all the packages that are required using npm install command . The “--save” flag adds the dependencies in package.json file.</p><pre>npm install --save express mongoose body-parser jsonwebtoken bcryptjs</pre><h4>3) Start the server and connect our MongoDB database.</h4><p>Your app.js file should look something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f1597b3395a24be1651534083b03c80/href">https://medium.com/media/3f1597b3395a24be1651534083b03c80/href</a></iframe><p>I personally prefer <em>nodemon </em>to start my server so that we don’t have to restart our server after every small change. nodemon does it automatically for you.</p><p>To install nodemon execute this in your terminal</p><pre>npm install -g nodemon</pre><p>Run “ <em>nodemon app.js </em>“ command in your current directory on your terminal. If you get the message “App started”, Voila!!! You have started your server.</p><h4>4) Setup our User Schema</h4><p>We need to define our User Schema for our user in our database. The user needs to have three basic information- email, username and a password.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb0efcf83c9ed7f85a2a6de2b3a84980/href">https://medium.com/media/cb0efcf83c9ed7f85a2a6de2b3a84980/href</a></iframe><h4>5) Add a post route for signup</h4><p>For creating a new user ,we first have to setup a post route to “/register”. While creating a new user account we will first check for two conditions</p><p>i)The email should be unique. If the email is already present in database we return a error.</p><p>ii)Similarly, the username should also be unique. If the username is already present in database we return a error.</p><p>If these conditions are satisfied we need to hash the password using <strong><em>bcryptjs </em></strong>and store it in the database.</p><blockquote><strong>Hashing</strong> is the act of converting passwords into unreadable strings of characters that are designed to be impossible to convert back, known as hashes.</blockquote><p>Hashing a password is important because if somebody has access to the database he/she can directly see the password it can compromise user security. You can read more about <strong><em>bcryptjs</em></strong> here( <a href="https://www.npmjs.com/package/bcryptjs">docs</a>).</p><p>Your “auth.js” file should look like this now.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c860beff83618016fb71ad39a15cc37/href">https://medium.com/media/8c860beff83618016fb71ad39a15cc37/href</a></iframe><h4>6) Add a post route for Login</h4><p>For login ,we first have to setup a post route to “/login”.</p><p>We first check if the email id is present in the database. If we find a user with the email provided we compare the password using <em>bcrypt.compareSync(plainPassword , hashedPassword)</em></p><p>If the email and password is correct we create a <strong>JSON Web Token(JWT)</strong> for the user and we add it to our header under the field “auth-token”. We create a JWT token using the jwt.sign(tokeninfo, aSecretCode) function. You might want to save the Secret Code as an environment variable. But for simplicity I have directly included it in my code.</p><p><strong>You might be wondering what is </strong><a href="https://www.npmjs.com/package/jsonwebtoken"><strong>JSON Web Token</strong></a><strong>?</strong></p><blockquote>Well,<strong> JSON Web Token (JWT)</strong> is an open standard that defines a compact and self-contained way of securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed. In simple words we can restrict certain pages of the website using JWT. If a valid token is found in the header then only the user can access such pages.</blockquote><p>So your final “auth.js” file including your route for signup and login should look like this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/60bb7399f476af89c4ba40ae81e1ca9c/href">https://medium.com/media/60bb7399f476af89c4ba40ae81e1ca9c/href</a></iframe><h4>6)Creating a Secret route and verifying a token</h4><p>We will create a sample route which can only be accessed if a valid user is signed in.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cab3ee164172334ce44c2f1b04970282/href">https://medium.com/media/cab3ee164172334ce44c2f1b04970282/href</a></iframe><p>Now lets create our <strong><em>verifyToken</em></strong> function. This function extracts the token from the header and then verifies it using jwt.verify() . If the token is unavailable we throw a 401 error “<em>Access Denied</em>”. If the token is correct we execute the next() function to move forward to execute the next instruction. Such type of a function is called a <a href="https://developer.mozilla.org/en-US/docs/Glossary/Middleware">middleware</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1044ca98ed38543d0fa60d6502e1091f/href">https://medium.com/media/1044ca98ed38543d0fa60d6502e1091f/href</a></iframe><h4>7) Testing with Postman</h4><p>So we have setup our code. All we have to do is test and see if everything works fine or not. I am using an application called Postman through which i can send requests(<a href="https://www.postman.com/">Link to Postman</a>).</p><p>First start up your server in case you haven’t.</p><p><strong>i)</strong> Lets create a new User. We will send a post request to the URL <strong><em>http://localhost:3000/register</em></strong></p><p>We can see that a new user has been created and added to our database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rFeuIFNZHuZZ-sUCy11McQ.png" /></figure><p><strong>ii)</strong> Lets try to Login using the above credentials. We will send a post request to the URL <strong><em>http://localhost:3000/login</em></strong></p><p>We can see the message Login successful with the generated token for the particular user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xg9qHHKiblGv0ZrLIc9XuQ.png" /></figure><p><strong>iii) </strong>Lets try to access the secret page. We have to send a get request to URL <a href="http://localhost:3000/">http://localhost:3000/</a></p><p>We add a “auth-token” as a key to the header with the value of the token from above login route message. After this when we send a request to the URL and we get the message “<em>This is a secret route</em>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EhcC9AGb8k21_c5x3Cs7Hw.png" /></figure><p>So we have successfully learnt how to Authenticate and Authorize a user on our Website. I have uploaded the code in my Github repository. Check it out <a href="https://github.com/atharvarockx/Authentication/"><strong><em>https://github.com/atharvarockx/Authentication/</em></strong></a></p><p>I hope you after reading this blog you get a better idea about how authentication and authorization works.</p><blockquote><em>This is my First Blog and I will be working on more such blogs to help out. </em>If you liked the article, you can 👏 the story and share it with others.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9a34d8fc85f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>