<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nagarjun Palavalli</title>
    <description>The latest articles on DEV Community by Nagarjun Palavalli (@nagarjun).</description>
    <link>https://dev.to/nagarjun</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F39228%2Fa3180c84-940d-4985-8c1d-7ea27a1c9829.jpg</url>
      <title>DEV Community: Nagarjun Palavalli</title>
      <link>https://dev.to/nagarjun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nagarjun"/>
    <language>en</language>
    <item>
      <title>Best practices to generate and store API keys using Node.js?</title>
      <dc:creator>Nagarjun Palavalli</dc:creator>
      <pubDate>Fri, 30 Nov 2018 07:43:49 +0000</pubDate>
      <link>https://dev.to/nagarjun/best-practices-to-generate-and-store-api-keys-using-nodejs-534d</link>
      <guid>https://dev.to/nagarjun/best-practices-to-generate-and-store-api-keys-using-nodejs-534d</guid>
      <description>&lt;p&gt;I'm building a Node.js application that primarily serves APIs. These APIs fall into two categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User APIs - to access specific user-endpoints like GET /users/:id/purchases&lt;/li&gt;
&lt;li&gt;Admin APIs - allows the company / customer consuming our APIs to call admin-level endpoints like POST /users (to create a new user)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am already securing user APIs using OAuth access tokens and refresh tokens. What is the best practice to secure my admin APIs? To be more specific, I'm looking to implement a solution like this - &lt;a href="https://mailchimp.com/help/about-api-keys/" rel="noopener noreferrer"&gt;https://mailchimp.com/help/about-api-keys/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The idea is to let my customer log into our admin app to create API keys so they can call our admin APIs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How do I generate keys similar to those generated by MailChimp?&lt;/li&gt;
&lt;li&gt;How do I validate these keys on the server using Node.js?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I've found dozens of articles that talk about JWTs but I doubt they are the right solution for this particular use case.&lt;/p&gt;

</description>
      <category>help</category>
    </item>
  </channel>
</rss>
