{"componentChunkName":"component---src-templates-blog-list-template-js","path":"/127","result":{"data":{"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Overview I want to explain the inspiration for React Hooks in this walkthrough, what React Hook is and the advantages of hooks, and more…","fields":{"slug":"/engineering/react-hooks-guide/"},"html":"<h2 id=\"overview\" style=\"position:relative;\"><a href=\"#overview\" aria-label=\"overview 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>Overview</h2>\n<p>I want to explain the inspiration for React Hooks in this walkthrough, what React Hook is and the advantages of hooks, and more. This article covers only an introduction to React Hooks. React Hooks have been introduced in React function components as a way of utilising state and side effects.</p>\n<p>Have you ever assigned a task to change the <strong>functional component</strong> which is full of UI and business logic to a <strong>Class Component</strong> just because the new feature requires the use of <strong>state</strong>, just to toggle some text colour to red on some events occurred?</p>\n<p>Chances are there if you are a react developer, Hopefully we can solve this using the Hooks.</p>\n<h2 id=\"what-are-hooks\" style=\"position:relative;\"><a href=\"#what-are-hooks\" aria-label=\"what are hooks 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>What are Hooks?</h2>\n<p>Hooks are features that allow you to “hook into” the features of <a href=\"/react-state-management/\">React state</a> and lifecycle from function components. Hooks do not function inside classes. Without classes, they let you use React.</p>\n<blockquote>\n<p>Hooks are a new addition in React 16.8. They let you use state and other React features without writing a class.</p>\n</blockquote>\n<p><a href=\"https://twitter.com/dan_abramov\">Dan Abramov</a> has provided a well-rounded introduction to the API, and how and why the framework that many of us use has evolved to where it is now. You can read about it and watch his <a href=\"https://medium.com/@dan_abramov/making-sense-of-react-hooks-fdbde8803889\">ReactConf 2018 keynote</a> introducing the hooks proposal.</p>\n<p>The key takeaway maybe this:</p>\n<blockquote>\n<p>If the React community embraces <strong>hooks</strong>, it will reduce the number of concepts you need to juggle when writing React applications. Hooks let you always use functions instead of having to constantly switch between functions, classes, higher-order components, and render props.</p>\n</blockquote>\n<h2 id=\"benefits-of-react-hooks\" style=\"position:relative;\"><a href=\"#benefits-of-react-hooks\" aria-label=\"benefits of react hooks 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>Benefits of React Hooks</h2>\n<p>React Hooks enables the functional components to attach the local state to it, so that you can use React functionality without using a <strong>class component</strong>.</p>\n<p>Advantages of react hooks:</p>\n<ul>\n<li>Readable</li>\n<li>Lesser Code.</li>\n<li>Overall Optimized component</li>\n<li>Writing a Functional component with state</li>\n<li>Writing complex components became easier</li>\n<li>Handling events &#x26; logics in functional components.</li>\n<li>Performance boost up with Functional Components</li>\n</ul>\n<h3 id=\"a-practical-view\" style=\"position:relative;\"><a href=\"#a-practical-view\" aria-label=\"a practical view 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>A Practical View</h3>\n<p>As you all know there are two ways to create the React components, one is using the <strong>function</strong> and other is using the <strong>class</strong>, there is always a confusion between one v/s other.</p>\n<p>Let us assume we have a simple class component and then we will convert it to a functional with hooks and see the difference. </p>\n<h4 id=\"component-without-hook-class-component\" style=\"position:relative;\"><a href=\"#component-without-hook-class-component\" aria-label=\"component without hook class component 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>Component without Hook: Class Component</h4>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"jsx\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">React</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">Component</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&quot;react&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">class</span><span class=\"mtk1\"> </span><span class=\"mtk10\">Greeting</span><span class=\"mtk1\"> </span><span class=\"mtk4\">extends</span><span class=\"mtk1\"> </span><span class=\"mtk10\">Component</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">state</span><span class=\"mtk1\"> = {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">text:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&quot;&quot;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  };</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">handleChange</span><span class=\"mtk1\"> = (</span><span class=\"mtk12\">e</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk11\">setState</span><span class=\"mtk1\">({ </span><span class=\"mtk12\">text:</span><span class=\"mtk1\"> </span><span class=\"mtk12\">e</span><span class=\"mtk1\">.</span><span class=\"mtk12\">target</span><span class=\"mtk1\">.</span><span class=\"mtk12\">value</span><span class=\"mtk1\"> });</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  };</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">render</span><span class=\"mtk1\">() {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">input</span><span class=\"mtk1\"> </span><span class=\"mtk12\">value</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">state</span><span class=\"mtk1\">.</span><span class=\"mtk12\">text</span><span class=\"mtk4\">}</span><span class=\"mtk1\"> </span><span class=\"mtk12\">onChange</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">handleChange</span><span class=\"mtk4\">}</span><span class=\"mtk1\"> </span><span class=\"mtk17\">/&gt;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk15\">default</span><span class=\"mtk1\"> </span><span class=\"mtk12\">Greeting</span><span class=\"mtk1\">; </span></span></code></pre>\n<h4 id=\"components-with-hookfunctional-component\" style=\"position:relative;\"><a href=\"#components-with-hookfunctional-component\" aria-label=\"components with hookfunctional component 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>Components with Hook:Functional Component:</h4>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"jsx\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">React</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">useState</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&quot;react&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk15\">default</span><span class=\"mtk1\"> () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">const</span><span class=\"mtk1\"> [</span><span class=\"mtk12\">text</span><span class=\"mtk1\">, </span><span class=\"mtk12\">setText</span><span class=\"mtk1\">] = </span><span class=\"mtk11\">useState</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;&quot;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> (</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">input</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk12\">value</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{</span><span class=\"mtk12\">text</span><span class=\"mtk4\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk12\">onChange</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{</span><span class=\"mtk1\">(</span><span class=\"mtk12\">e</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk11\">setText</span><span class=\"mtk1\">(</span><span class=\"mtk12\">e</span><span class=\"mtk1\">.</span><span class=\"mtk12\">target</span><span class=\"mtk1\">.</span><span class=\"mtk12\">value</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      }</span><span class=\"mtk4\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk17\">/&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  );</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">};</span></span></code></pre>\n<blockquote>\n<p>If you disagree with any of the above, you can play with it in practice. I’m sure that would change your mind! </p>\n</blockquote>\n<h2 id=\"basics-of-react-hooks\" style=\"position:relative;\"><a href=\"#basics-of-react-hooks\" aria-label=\"basics of react hooks 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>Basics Of React Hooks</h2>\n<p>Let us understand some basic hooks with examples.</p>\n<ol>\n<li>useState()</li>\n<li>useEffect()</li>\n</ol>\n<p>I will take one example and will explain all the hooks in that example using a various scenarios.</p>\n<h3 id=\"usestate\" style=\"position:relative;\"><a href=\"#usestate\" aria-label=\"usestate 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>useState()</h3>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"jsx\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">React</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">useState</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;react&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk11\">App</span><span class=\"mtk1\"> = () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">const</span><span class=\"mtk1\"> [</span><span class=\"mtk12\">message</span><span class=\"mtk1\">, </span><span class=\"mtk12\">setMessage</span><span class=\"mtk1\">] = </span><span class=\"mtk11\">useState</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Hi there, how are you?&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">h1</span><span class=\"mtk17\">&gt;</span><span class=\"mtk4\">{</span><span class=\"mtk12\">message</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">h1</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">};</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk15\">default</span><span class=\"mtk1\"> </span><span class=\"mtk12\">App</span><span class=\"mtk1\">;</span></span></code></pre>\n<p>In this example variable <code>message</code> will save the value <strong>Hi there, how are you</strong> using the <code>useState()</code> hooks. It will be similar to this code we write in the <code>constructor()</code> of <strong>class component</strong>. </p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">state</span><span class=\"mtk1\"> = {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">message:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&quot;Hi there, how are you?&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<blockquote>\n<p>If you are wondering about the <code>setMessage</code> @line 3 then be calm, I will explain later in this tutorial</p>\n</blockquote>\n<h3 id=\"useeffect\" style=\"position:relative;\"><a href=\"#useeffect\" aria-label=\"useeffect 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>useEffect()</h3>\n<p>React <code>useEffect()</code> function can be executed in 3 different React component life cycles that are</p>\n<ol>\n<li>componentDidMount</li>\n<li>componentDidUpdate</li>\n<li>componentWillUnmount</li>\n</ol>\n<p>Let's understand the <code>useEffect()</code> hook by taking the above example. So let's say I want to change the message 1 second after the component is mounted.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"jsx\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">React</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">useState</span><span class=\"mtk1\">, </span><span class=\"mtk12\">useEffect</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&quot;react&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk11\">App</span><span class=\"mtk1\"> = () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">const</span><span class=\"mtk1\"> [</span><span class=\"mtk12\">message</span><span class=\"mtk1\">, </span><span class=\"mtk12\">setMessage</span><span class=\"mtk1\">] = </span><span class=\"mtk11\">useState</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Hi there, how are you?&quot;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">useEffect</span><span class=\"mtk1\">(() </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;trigger use effect hook&quot;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk11\">setTimeout</span><span class=\"mtk1\">(() </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk11\">setMessage</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;I&#39;m fine, thanks for asking.&quot;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    }, </span><span class=\"mtk7\">1000</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  });</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">h1</span><span class=\"mtk17\">&gt;</span><span class=\"mtk4\">{</span><span class=\"mtk12\">message</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">h1</span><span class=\"mtk17\">&gt;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">};</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk15\">default</span><span class=\"mtk1\"> </span><span class=\"mtk12\">App</span><span class=\"mtk1\">;</span></span></code></pre>\n<p>As you can see, In this example we have used the <code>useEffect</code> hook to trigger the <code>setMessage</code> method the change the <code>message</code> variable after 1 second.</p>\n<p>But there is one problem, while executing this component you can see that the <code>console.log</code> will trigger twice. The reason is the <code>useEffect</code> hook will by default trigger on change of either <code>state</code> or <code>props</code> similar to the <code>componentDidUpdate</code> method in our class component.</p>\n<p>To overcome this kind of case we need to pass the <strong>Empty array ([])</strong> as the second argument in the useEffect hooks. So updated code will look like this</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"jsx\" data-index=\"5\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">React</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">useState</span><span class=\"mtk1\">, </span><span class=\"mtk12\">useEffect</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;react&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk11\">App</span><span class=\"mtk1\"> = () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">const</span><span class=\"mtk1\"> [</span><span class=\"mtk12\">message</span><span class=\"mtk1\">, </span><span class=\"mtk12\">setMessage</span><span class=\"mtk1\">] = </span><span class=\"mtk11\">useState</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Hi there, how are you?&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">useEffect</span><span class=\"mtk1\">(() </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;trigger use effect hook&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk11\">setTimeout</span><span class=\"mtk1\">(() </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk11\">setMessage</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;I&#39;m fine, thanks for asking.&quot;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    }, </span><span class=\"mtk7\">1000</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }, []);</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">h1</span><span class=\"mtk17\">&gt;</span><span class=\"mtk4\">{</span><span class=\"mtk12\">message</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">h1</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">};</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk15\">default</span><span class=\"mtk1\"> </span><span class=\"mtk12\">App</span><span class=\"mtk1\">;</span></span></code></pre>\n<p>The above code means that hook will never be triggered as we have an empty array there, if we want to trigger the hook on a specific variable change of <code>props</code> or <code>state</code> we can add that variable in the array.</p>\n<p>For eg : <code>[state.message]</code> here hook will fire on the update of message variable only.</p>\n<p>I have covered the two basic and important hooks in this tutorial, there are many more types of hooks available in React, you can find the <a href=\"https://reactjs.org/docs/hooks-custom.html\">detailed explanation</a> in the React docs.</p>\n<h3 id=\"the-rules-of-hooks\" style=\"position:relative;\"><a href=\"#the-rules-of-hooks\" aria-label=\"the rules of hooks 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>The Rules of Hooks</h3>\n<ol>\n<li>Hooks can only be called at the Top Level, it can't be called <strong>inside the loops or condition or nested functions</strong>.</li>\n<li>Hooks can only be called in the <strong>React Function</strong> or <strong>Custom Hooks</strong>, never use hooks in the regular javascript function.</li>\n</ol>\n<blockquote>\n<p>We can use <a href=\"https://www.npmjs.com/package/eslint-plugin-react-hooks\">eslint-plugin-react-hooks</a> this eslint plugin that ensures the above two rules.</p>\n</blockquote>\n<h2 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion 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>Conclusion</h2>\n<p>So, from multiple points of view, we have covered the power of Hooks and seen how we can use controlled state in our Components without utilizing classes. </p>\n<p>I hope you find this article useful, Happy Reading !!!</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\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  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\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-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk10 { color: #4EC9B0; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk17 { color: #808080; }\n  .dark-default-dark .mtk7 { color: #B5CEA8; }\n</style>","frontmatter":{"date":"August 07, 2020","updated_date":null,"description":"A walkthrough guide on React Hooks, what is React Hooks, benefits of Hooks, and how to use Hooks in React and more.","title":"React Hooks: A Beginners Guide","tags":["React","Hooks"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.36986301369863,"src":"/static/48f1a9f24091fba7929dcb79ec13b4fe/58556/react-hooks.webp","srcSet":"/static/48f1a9f24091fba7929dcb79ec13b4fe/61e93/react-hooks.webp 200w,\n/static/48f1a9f24091fba7929dcb79ec13b4fe/1f5c5/react-hooks.webp 400w,\n/static/48f1a9f24091fba7929dcb79ec13b4fe/58556/react-hooks.webp 800w,\n/static/48f1a9f24091fba7929dcb79ec13b4fe/99238/react-hooks.webp 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Mohammed Modi","github":"mohammed786","avatar":null}}}},{"node":{"excerpt":"If enterprise mobile apps are the future of businesses, we are already living in the future. With the growing popularity of technologies…","fields":{"slug":"/identity/securing-enterprise-mobile-apps/"},"html":"<p>If enterprise mobile apps are the future of businesses, we are already living in the future. With the growing popularity of technologies like 5G, blockchain, AI, and machine language, more and more companies are integrating their corporate processes with mobile platforms.</p>\n<p>Some of these primary capabilities include the management of security, IT infrastructure, content, salesforce, human resource, business intelligence (BI), billing system, and product catalogs.</p>\n<p>No doubt, mobile applications are gradually becoming a staple in enterprises. </p>\n<p>With all the good that's going around, it is crucial that we flip and try to see through the other side of the scenario.</p>\n<h2 id=\"latest-threats-in-the-enterprise-mobile-app-security\" style=\"position:relative;\"><a href=\"#latest-threats-in-the-enterprise-mobile-app-security\" aria-label=\"latest threats in the enterprise mobile app security 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>Latest Threats in the Enterprise Mobile App Security</h2>\n<p>Mobile will take over the enterprise software universe very soon. Almost <a href=\"https://www.warc.com/content/paywall/article/warc-datapoints/almost_three_quarters_of_internet_users_will_be_mobileonly_by_2025/124845\">three-quarters of internet users</a> (that sums up to 72.6 percent) will use mobile to access the web by 2025. </p>\n<p>No wonder, businesses of all sizes are making the shift towards enterprise mobile apps.</p>\n<p>What could go wrong? It turns out, a lot. Even a well-established enterprise can fail spectacularly—with respect to <em>security</em>—when they take on mobile.</p>\n<p>Zimperium's <a href=\"https://get.zimperium.com/threat-report-2019-h1/\">2019 State of Enterprise Mobile Security</a> findings below highlights the nuances:</p>\n<ul>\n<li>32% of enterprise mobile endpoints encountered risky networks.</li>\n<li>27% of enterprise mobile endpoints were exposed to device threats.</li>\n<li>7% of enterprise mobile endpoints were exposed to network attacks.</li>\n<li>Almost one out of 10 were exposed to network attacks.</li>\n<li>Man-in-the-middle (MITM) attacks were 93% of network threats and 86% of all risks.</li>\n<li>Apple patched 54% more vulnerabilities than the same timeframe last year.</li>\n</ul>\n<h2 id=\"mobile-app-security-threats-that-you-should-take-seriously-in-2020\" style=\"position:relative;\"><a href=\"#mobile-app-security-threats-that-you-should-take-seriously-in-2020\" aria-label=\"mobile app security threats that you should take seriously in 2020 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>Mobile App Security Threats That You Should Take Seriously in 2020 </h2>\n<p>Mobile security is at the epicenter of an enterprise's concern today. After all, nearly all employees now regularly access corporate data on mobile. You need to keep confidential information out of the wrong hands, and that's an intricate puzzle in itself.</p>\n<p>Following are the major threats security teams need to deal with:</p>\n<p><strong>Improper Session Handling</strong>: Most applications use tokens to allow users to perform multiple actions without re-authenticating their identity every time. Improper session handling happens when apps involuntarily exchange session tokens (for example, with the bad guys), they can <a href=\"https://www.loginradius.com/blog/2020/04/corporate-account-takeover-attacks/\">exploit the website and the corporate network</a>, altogether.</p>\n<p><strong>Insecure data storage</strong>: There are many vulnerable places in an application where data can be stored: binary data stores, SQL databases, and cookie stores are a few. Majority of these vulnerabilities are triggered by the OS, frameworks, and compilers involved. Often, the poor storage of data results from inadequate processes to manage device gallery and data cache.</p>\n<p><a href=\"https://www.loginradius.com/resource/the-enterprise-buyers-guide-to-consumer-identity/\"><img src=\"/860c267222fd012ab48fe9e6c26d0129/EB-The-Enterprise-Buyer%E2%80%99s-Guide-to-Consumer-Identity.webp\" alt=\"Enterprise Buyer’s Guide to Consumer Identity Ebook\"></a></p>\n<p><strong>Improper encryption</strong>: Encryption is the method of translating data into an unreadable code that is only usable with the secret key after it has been re-translated. Therefore, it is important to evaluate how easy or difficult it might be to crack your application's secret code. This is a common vulnerability that hackers exploit with code and intellectual property theft, leading to <a href=\"https://www.loginradius.com/blog/2019/12/digital-privacy-best-practices/\">privacy violations</a>, and damage to reputation.</p>\n<p><strong>Mobile ad fraud</strong>: With the amount of revenue generated by mobile advertising every year, it is no surprise that cybercriminals are after all the cash that can be duped from mobile ad revenue streams. One of the most common types of ad fraud is using malware to generate fraudulent clicks on ads that appear to come from real uses. Ad fraud malware often runs in the background and can overheat the battery, incur high data charges, and make users lose millions of dollars.</p>\n<p><strong>Human error from remote workers</strong>: Human error is perhaps one of the most commonly observed <a href=\"https://www.loginradius.com/blog/2019/10/cybersecurity-attacks-business/\">cybersecurity threats</a>. Despite the steady rise in mass media reporting of cybersecurity accidents, the non-technical population still lacks basic security knowledge. Your responsibility as an enterprise owner is to educate employees on mobile security threats and prevent cybercriminals from accessing a device or network.</p>\n<h2 id=\"features-of-a-secured-enterprise-mobile-application\" style=\"position:relative;\"><a href=\"#features-of-a-secured-enterprise-mobile-application\" aria-label=\"features of a secured enterprise mobile application 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>Features of a Secured Enterprise Mobile Application</h2>\n<p>A holistic approach to security for mobile devices is regarded as an essential part of a security ecosystem. Keeping data storage and application management at the center, here's what the entire ecosystem looks like.</p>\n<p><img src=\"/b55f09bf90ac54b9c69c7d73795099b7/image2-1.webp\"></p>\n<h2 id=\"securing-mobile-apps-using-loginradius-secured-platform\" style=\"position:relative;\"><a href=\"#securing-mobile-apps-using-loginradius-secured-platform\" aria-label=\"securing mobile apps using loginradius secured platform 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>Securing Mobile Apps Using LoginRadius' Secured Platform</h2>\n<p><img src=\"/abedc686b1299fade71644a104babdd0/3-1024x621.webp\"></p>\n<p>LoginRadius, a <a href=\"https://www.loginradius.com/blog/2019/06/customer-identity-and-access-management/\">consumer identity and access management</a> (CIAM) solution, offers a comprehensive approach to protecting enterprise mobile applications. While human error is unavoidable, the platform is an all-in-one solution for all mobile security needs. Some of the features include:</p>\n<h3 id=\"identity-management\" style=\"position:relative;\"><a href=\"#identity-management\" aria-label=\"identity management 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>Identity management </h3>\n<p>The most efficient mobile security involves intelligent device identification. This describes the emergence and development of identity and access management services like LoginRadius, which offers a host of advantages: </p>\n<ul>\n<li>It simplifies the process of access management related to mobile devices.</li>\n<li>It forces device authorization based on the pre-defined metrics. </li>\n<li>It eliminates human errors to quite an extent.</li>\n<li>It abides by international <a href=\"https://www.loginradius.com/compliances/\">data regulatory compliances</a>. </li>\n</ul>\n<h3 id=\"multi-factor-authentication-mfa\" style=\"position:relative;\"><a href=\"#multi-factor-authentication-mfa\" aria-label=\"multi factor authentication mfa 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>Multi-factor authentication (MFA)</h3>\n<p>MFA is ideally a <a href=\"https://www.loginradius.com/blog/2019/06/what-is-multi-factor-authentication/\">kind of authentication</a> granted on the server-side and is available after successful authorization. LoginRadius ensures that all user data is encrypted and accessed only after all credentials are successfully validated. Moreover, it creates different authentication tokens for different devices.</p>\n<h3 id=\"adaptive-mobile-security\" style=\"position:relative;\"><a href=\"#adaptive-mobile-security\" aria-label=\"adaptive mobile security 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>Adaptive mobile security</h3>\n<p>LoginRadius takes an integrated approach when it comes to <a href=\"https://www.loginradius.com/web-and-mobile-sso/\">responding to mobile threats</a>. It offers a thread of risk management and information security features to prevent cyberattacks or upcoming mobile app vulnerabilities from happening.</p>\n<h3 id=\"data-security\" style=\"position:relative;\"><a href=\"#data-security\" aria-label=\"data security 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>Data security</h3>\n<p>LoginRadius defends user data by profoundly analyzing the issue that may exist and produces defense strategies accordingly. It keeps you well-informed about how different operating systems, <a href=\"https://www.loginradius.com/identity-api/\">external APIs</a>, platforms, and enterprise mobile frameworks store and transfer their data. </p>\n<h2 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion 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>Conclusion </h2>\n<p>Sadly, very few companies have a well-secured management policy, while still a lot of others lack absolute power.  </p>\n<p>Enterprise mobile app security is the need of the hour. Businesses must consider the changing state of cybersecurity and mobility when implementing the above-mentioned <a href=\"https://www.loginradius.com/resource/infographic/cybersecurity-best-practices-for-enterprise/\">protection tips</a> to secure their devices. </p>\n<p><a href=\"https://www.loginradius.com/contact-us?utm_source=blog&#x26;utm_medium=web&#x26;utm_campaign=securing-enterprise-mobile-apps\"><img src=\"/1bebf239d110701b9b534d7eb481a5ac/Book-a-demo-1024x310.webp\" alt=\"Book-a-demo-loginradius\"></a></p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\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  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\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-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"August 07, 2020","updated_date":null,"description":"We are already living in the future as corporate mobile applications are the future of companies. More and more businesses are combining their organisational processes with mobile networks with the the popularity of innovations such as 5 G, blockchain, AI , and machine language.","title":"Securing Enterprise Mobile Apps with LoginRadius","tags":["security"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.408450704225352,"src":"/static/899394e76907ff847d314a89b6ded679/7f8e9/Secure-Enterprise-Mobile-App.webp","srcSet":"/static/899394e76907ff847d314a89b6ded679/61e93/Secure-Enterprise-Mobile-App.webp 200w,\n/static/899394e76907ff847d314a89b6ded679/1f5c5/Secure-Enterprise-Mobile-App.webp 400w,\n/static/899394e76907ff847d314a89b6ded679/7f8e9/Secure-Enterprise-Mobile-App.webp 768w","sizes":"(max-width: 768px) 100vw, 768px"}}},"author":{"id":"Rakesh Soni","github":"oyesoni","avatar":"rakesh-soni.webp"}}}},{"node":{"excerpt":"Overview Each business relies on a specific target set of users, who has a problem area. Analysis and further finding out the right solution…","fields":{"slug":"/engineering/design-led-thinking/"},"html":"<h3 id=\"overview\" style=\"position:relative;\"><a href=\"#overview\" aria-label=\"overview 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>Overview</h3>\n<p>Each business relies on a specific target set of users, who has a problem area.</p>\n<p>Analysis and further finding out the right solution for the identified problem hence helps businesses to meet their target user’s needs.</p>\n<p>If the solution meets the needs completely and resolves the pain area, at the right time, acts as an ointment and proves and builds trust for businesses.</p>\n<p>Design Thinking plays an important role to reiterate the understanding of problems, causes, environmental changes leading innovation and experimentation for a competitive advantage.</p>\n<h3 id=\"how-to-define-a-problem-for-the-business-problem-with-design-thinking\" style=\"position:relative;\"><a href=\"#how-to-define-a-problem-for-the-business-problem-with-design-thinking\" aria-label=\"how to define a problem for the business problem with design thinking 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>How to define a problem for the business problem with DESIGN THINKING</h3>\n<p><img src=\"/5db46cf2430fb3f1e2b7798f183238f1/design_thinking_process.webp\" alt=\"Design Thinking Process\"></p>\n<ol>\n<li><strong>Empathise</strong> the emotions\nObservation of user needs with past and market trends and economic forecasts. It includes interaction with the target user to hear and see the user’s desire and the real cause within the contextual area.</li>\n<li>\n<p><strong>Define</strong> the problem - based on\n5 W’s- who, what, where, why, when</p>\n<ol>\n<li>Why-What user needs?</li>\n<li>What is the pain area of the problem?</li>\n<li>When the problem arises?</li>\n<li>Who-For whom the problem exists?</li>\n<li>Where-What are the driving aspects of the problem which increases the problem impact- like legal compliance?                                                                                                        </li>\n</ol>\n</li>\n<li>\n<p><strong>Ideation</strong> - Design Thinking solutions </p>\n<ul>\n<li>Research new ways to solve existing problems </li>\n<li>Focus on humans, NOT users </li>\n<li>Ideation of solutions with collaboration and participation of brainstorming, sketching, etc </li>\n<li>Fit best in the existing environment with minimal change</li>\n</ul>\n</li>\n<li>\n<p><strong>User Experience</strong> - prototype</p>\n<ul>\n<li>From the best solutions to prototypes for UI testing</li>\n<li>Feedback from target users.</li>\n<li>Rapid change compatibility with changing needs.</li>\n<li>Competitors collaborate in the same environment.</li>\n</ul>\n</li>\n</ol>\n<p>  5.<strong>Testing of design and solution</strong></p>\n<p>   Match the solution ideas demonstrated via designs to target users, to make sure every detail of the solution chosen matches the requirements and observations made.</p>\n<ol start=\"6\">\n<li><strong>Evaluate</strong> and reiterate the solution for measuring user needs.</li>\n</ol>\n<h3 id=\"new-design-thinkings-vs-traditional-business-thinking\" style=\"position:relative;\"><a href=\"#new-design-thinkings-vs-traditional-business-thinking\" aria-label=\"new design thinkings vs traditional business thinking 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>New Design Thinkings VS Traditional Business Thinking</h3>\n<table>\n<thead>\n<tr>\n<th>Criteria</th>\n<th>Design Thinking</th>\n<th>Traditional Problem Solving</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Nature</strong></td>\n<td>Visual Thinking Process</td>\n<td>Old traditional documented process</td>\n</tr>\n<tr>\n<td><strong>Initial Stage</strong></td>\n<td>Observation, based on Emotional intelligence</td>\n<td>Problem Defining, based on intelligence</td>\n</tr>\n<tr>\n<td><strong>Based Depends on</strong></td>\n<td>Experiment, Innovation based on user needs</td>\n<td>Based on founders vision</td>\n</tr>\n<tr>\n<td><strong>Focussed On</strong></td>\n<td>What People needs</td>\n<td>Business model</td>\n</tr>\n<tr>\n<td><strong>User means</strong></td>\n<td>Real Humans</td>\n<td>Customers</td>\n</tr>\n<tr>\n<td><strong>Solution Proposal</strong></td>\n<td>Restricts proposing solutions within the problem definition stage.</td>\n<td>Includes proposing solutions while problem understanding</td>\n</tr>\n<tr>\n<td><strong>Future Scope</strong></td>\n<td>Visualize the future of business organization via innovation thinking, via releasing products before actual development.</td>\n<td>Rework and re-iteration with improvement are supported to reach final product deliverable.</td>\n</tr>\n<tr>\n<td><strong>Meaning</strong></td>\n<td>Discovery of what WORKS.So encourages Multiple POSSIBLE answers</td>\n<td>Discovery of what is RIGHT = CORRECT solution.</td>\n</tr>\n<tr>\n<td><strong>Approach</strong></td>\n<td>Based on storytelling following a bottom-up approach</td>\n<td>Based on facts and figures, based on top-down approach</td>\n</tr>\n<tr>\n<td><strong>Testing with real users</strong></td>\n<td>User is unaware that he is in test mode and experiences the service he expects to perceive. Example- ability to customize furniture without buying.</td>\n<td>User is well aware that he is using test services and does not expect much.</td>\n</tr>\n<tr>\n<td><strong>Phase</strong></td>\n<td>There is no planning, instead there exists building of Prototypes and presenting fast to get feedback without delaying the GO-TO market.</td>\n<td>Follows conventions process of THINKING and PLANNING</td>\n</tr>\n<tr>\n<td><strong>Failure</strong></td>\n<td>Failure Driven- learn from failure and read to fail anytime as the cost associated is low. FAIL EARLY- FAIL FAST</td>\n<td>Failure Restrictor- Tries to avoid failure, to avoid huge money loss involved.</td>\n</tr>\n</tbody>\n</table>\n<h3 id=\"how-is-it-useful-for-business-organizations\" style=\"position:relative;\"><a href=\"#how-is-it-useful-for-business-organizations\" aria-label=\"how is it useful for business organizations 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>How is it useful for business Organizations?</h3>\n<ol>\n<li>Real-Time- Feedback from the end-user is instant and does not take months to develop.</li>\n<li>Low Cost- Just involves a small team, rather than a big team, processes, roles, etc.</li>\n<li>Prototype instead of Planning- providing better visual experience to users instead of lengthy documents to analyze a viable solution.</li>\n<li>Leads to EXPERIMENTS, INNOVATIONS of -\n-Experience\n-Emotions\n-Processes\n-Features or functionality</li>\n</ol>\n<h3 id=\"successful-case-studies\" style=\"position:relative;\"><a href=\"#successful-case-studies\" aria-label=\"successful case studies 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>Successful Case Studies</h3>\n<ol>\n<li>\n<p><strong>Pepsico design-led problem-solving</strong>\nFor female user experience, it released a new line of Doritos in china in a stack of the tray and packaged in a canister, instead of a snack bag, so that women can use it opening the drawer and push it back when done, as they don't like other to notice them munching.</p>\n<p>Ref: <a href=\"https://hbr.org/2015/09/how-indra-nooyi-turned-design-thinking-into-strategy?referral=03759&#x26;cm_vc=rr_item_page.bottom\">How Indra Nooyi Turned Design Thinking Into Strategy</a></p>\n</li>\n<li>\n<p><strong>Samsung’s design-led innovation</strong>\nIt realized the need of Korean and Japanese business users who had common practice to note or schedule events or important points in small pocket-sized notebooks, This led to an innovative idea where the user was observed and the need was created and hence realized to users.\nSamsung launched a successful Galaxy Note series. with the innovation of “smart diary” a 5.5-inch interface with a stylus pen to pair.</p>\n<p>Ref: <a href=\"https://hbr.org/2015/09/how-samsung-became-a-design-powerhouse\">How Samsung Became a Design Powerhouse</a> </p>\n</li>\n<li>\n<p><strong>Samsung design concept used for experimenting</strong>\nWhere it experimented with TV units, realizing the fact that users are spending more time on furniture, so TV ‘s are supposed to be a bit more attractive. This led to the radical change for the speaker’s positioning at the TV sets to be hidden at the bottom instead of the traditional side panes. This has experimented in the European market first and after a successful adaption, Samsung experimented more with visual appearance and by the time it was building the product, it had already sold a million units.</p>\n<p>Ref: <a href=\"https://hbr.org/2015/09/how-samsung-became-a-design-powerhouse?registration=success\">How Samsung Became a Design Powerhouse</a></p>\n</li>\n<li><strong>IBM</strong>  - It got an ROI of 301 %, by investing in Design Thinking services which can be experienced at <a href=\"https://www.ibm.com/design/thinking/\">IBM</a></li>\n<li>\n<p><strong>Stanford Hospital</strong> for improvement\nIt worked on improving the experience of a patient within the emergency room and for staff to serve patients a better way</p>\n<p>Ref: <a href=\"https://think360studio.com/blog/what-is-design-thinking-and-design-thinking-process\">What Is Design Thinking and Design Thinking Process?</a></p>\n</li>\n</ol>\n<h3 id=\"last-but-not-least\" style=\"position:relative;\"><a href=\"#last-but-not-least\" aria-label=\"last but not least 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>Last but not least</h3>\n<p>It is very important to drive and extract meaningful images out of the observations from real humans.\nThis requires an influencing processor who can drive the team to opt for an approach for DESIGN THINKING. Here even the market leaders are at risk to sustain with innovations and experiments involved with Early FAILURES.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\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  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\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-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"August 06, 2020","updated_date":null,"description":"Design thinking is a solution-oriented, iterative process where the team creates the design while keeping the end customers in mind. This blog guides you about how does design-led thinking works.","title":"DESIGN THINKING -A visual approach to understand  user’s needs","tags":["Design","Design Thinking","UX"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.7699115044247788,"src":"/static/110edfa95f48f0a46a297c46621f3040/58556/design_led_thinking.webp","srcSet":"/static/110edfa95f48f0a46a297c46621f3040/61e93/design_led_thinking.webp 200w,\n/static/110edfa95f48f0a46a297c46621f3040/1f5c5/design_led_thinking.webp 400w,\n/static/110edfa95f48f0a46a297c46621f3040/58556/design_led_thinking.webp 800w,\n/static/110edfa95f48f0a46a297c46621f3040/99238/design_led_thinking.webp 1200w,\n/static/110edfa95f48f0a46a297c46621f3040/135cd/design_led_thinking.webp 1280w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Deepali Soni","github":null,"avatar":null}}}},{"node":{"excerpt":"Audience:  Anyone who wishes to deliver secure code to the rest of the world. Answer to What it is? At the heart of any image scanning tool…","fields":{"slug":"/engineering/container-security-scanning/"},"html":"<p>Audience:  Anyone who wishes to deliver secure code to the rest of the world.</p>\n<h2 id=\"answer-to-what-it-is\" style=\"position:relative;\"><a href=\"#answer-to-what-it-is\" aria-label=\"answer to what it is 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>Answer to <strong>What it is?</strong></h2>\n<p>At the heart of any image scanning tool is static analysis against a “Common Vulnerabilities and Exposures” (CVE) database. Each layer within the container image is analyzed and queried to discover known vulnerabilities. </p>\n<p>In addition to vulnerability scanning, a comprehensive tool should compare the architecture of your application against best practices to identify potential vulnerabilities. </p>\n<h2 id=\"answer-to-why-it-is-important\" style=\"position:relative;\"><a href=\"#answer-to-why-it-is-important\" aria-label=\"answer to why it is important 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>Answer to <strong>Why it is important?</strong></h2>\n<p>While tools like Kubernetes and Container Registries have become household names for developer community because these tools make their life much easier to develop and deploy applications, many are still catching up on the need to integrate container security tools to secure their containerized application throughout the container lifecycle.  As the world is already shifted to containerized applications, taking good care of you docker images is also equally important.</p>\n<p>One of the main unique features of containers is how layers are used to build a container image. A service is piled up with an application server layer, a Linux layer and so on. One of these layers is updated, we can rebuild the application with a new updated version.</p>\n<p>It would be an unthinking idea to get into a container-based strategy without integrating a well-grounded and inclusive container scanning security solution into the CI/CD setup.</p>\n<h2 id=\"what-are-the-factors-to-keep-in-mind-while-selecting-the-right-tool\" style=\"position:relative;\"><a href=\"#what-are-the-factors-to-keep-in-mind-while-selecting-the-right-tool\" aria-label=\"what are the factors to keep in mind while selecting the right tool 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>What are the factors to keep in mind while selecting the right tool?</h2>\n<ul>\n<li>The CVE database should be up-to-date to any new vulnerability.</li>\n<li>The tool should give good coverage and should be easy to integrate.</li>\n<li>Few Image registries like Amazon ECR and Docker Hub, they have it as inbuild container security solution.</li>\n</ul>\n<h2 id=\"lets-get-implemented\" style=\"position:relative;\"><a href=\"#lets-get-implemented\" aria-label=\"lets get implemented 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>Let's get Implemented.</h2>\n<p>I am here, implementing a Clair tool in gitlab-ci.yml to get secure docker images.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">image_scanning:</span>\n<span class=\"grvsc-line\">  stage: scan</span>\n<span class=\"grvsc-line\">  image: docker:stable</span>\n<span class=\"grvsc-line\">  tags:</span>\n<span class=\"grvsc-line\">    - gitlab-org-docker</span>\n<span class=\"grvsc-line\">  services:</span>\n<span class=\"grvsc-line\">    - docker:19.03.8-dind   </span>\n<span class=\"grvsc-line\">  variables:</span>\n<span class=\"grvsc-line\">    DOCKER_DRIVER: overlay2</span>\n<span class=\"grvsc-line\">  allow_failure: true</span>\n<span class=\"grvsc-line\">  before_script:</span>\n<span class=\"grvsc-line\">    - echo $CI_BUILD_TOKEN | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY</span>\n<span class=\"grvsc-line\">  script:</span>\n<span class=\"grvsc-line\">  - docker run -d --name db arminc/clair-db:latest</span>\n<span class=\"grvsc-line\">  - docker run -p 6060:6060 --link db:postgres -d --name clair --restart on-failure arminc/clair-local-scan:v2.0.1</span>\n<span class=\"grvsc-line\">  - apk add -U wget ca-certificates</span>\n<span class=\"grvsc-line\">  - docker pull $CI_REGISTRY_IMAGE:$PROJECT_NAME-latest || true</span>\n<span class=\"grvsc-line\">  - wget https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64</span>\n<span class=\"grvsc-line\">  - mv clair-scanner_linux_amd64 clair-scanner</span>\n<span class=\"grvsc-line\">  - chmod +x clair-scanner</span>\n<span class=\"grvsc-line\">  - touch clair-whitelist.yml</span>\n<span class=\"grvsc-line\">  - while( ! wget -q -O /dev/null http://docker:6060/v1/namespaces ) ; do sleep 1 ; done</span>\n<span class=\"grvsc-line\">  - retries=0</span>\n<span class=\"grvsc-line\">  - echo &quot;Waiting for clair daemon to start&quot;</span>\n<span class=\"grvsc-line\">  - while( ! wget -T 10 -q -O /dev/null http://docker:6060/v1/namespaces ) ; do sleep 1 ; echo -n &quot;.&quot; ; if [ $retries -eq 10 ] ; then echo &quot; Timeout, aborting.&quot; ; exit 1 ; fi ; retries=$(($retries+1)) ; done</span>\n<span class=\"grvsc-line\">  - ./clair-scanner -c http://docker:6060 --ip $(hostname -i) -r gl-container-scanning-report.json -l clair.log -w clair-whitelist.yml $CI_REGISTRY_IMAGE:$PROJECT_NAME-latest || true</span>\n<span class=\"grvsc-line\">  - cat gl-container-scanning-report.json</span>\n<span class=\"grvsc-line\">  artifacts:</span>\n<span class=\"grvsc-line\">    paths: [gl-container-scanning-report.json]</span>\n<span class=\"grvsc-line\">  rules:</span>\n<span class=\"grvsc-line\">    - if: &#39;$CI_COMMIT_BRANCH == &quot;staging&quot;&#39;</span>\n<span class=\"grvsc-line\">      when: always</span></code></pre>\n<p><code>gitlab-org-docker</code> is a GitLab shared-runner to run this analysis (an agent on which the above-described job will run), it will fetch the latest ms image and will run it against the CVE database, at last record the report in the JSON file which we can store as artifacts. These artifacts can be further used by the developer to see and resolve the vulnerabilities.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\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  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\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-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n</style>","frontmatter":{"date":"August 04, 2020","updated_date":null,"description":"At the heart of any image scanning tool is static analysis against a “Common Vulnerabilities and Exposures” (CVE) database. Each layer within the container image is analyzed and queried to discover known vulnerabilities.","title":"Deep Dive into Container Security Scanning","tags":["Docker","Container","Security"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5625,"src":"/static/3420a61c66e126bfa00855959eeb5a57/58556/cover_container_security.webp","srcSet":"/static/3420a61c66e126bfa00855959eeb5a57/61e93/cover_container_security.webp 200w,\n/static/3420a61c66e126bfa00855959eeb5a57/1f5c5/cover_container_security.webp 400w,\n/static/3420a61c66e126bfa00855959eeb5a57/58556/cover_container_security.webp 800w,\n/static/3420a61c66e126bfa00855959eeb5a57/99238/cover_container_security.webp 1200w,\n/static/3420a61c66e126bfa00855959eeb5a57/7c22d/cover_container_security.webp 1600w,\n/static/3420a61c66e126bfa00855959eeb5a57/25f09/cover_container_security.webp 1920w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Rashmi Jain","github":null,"avatar":null}}}},{"node":{"excerpt":"Before You Get Started This tutorial assumes you have: A basic understanding of Go Language Latest GoLang version installed on your system A…","fields":{"slug":"/engineering/sending-emails-with-golang/"},"html":"<h2 id=\"before-you-get-started\" style=\"position:relative;\"><a href=\"#before-you-get-started\" aria-label=\"before you get started 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>Before You Get Started</h2>\n<p>This tutorial assumes you have:</p>\n<ul>\n<li>A basic understanding of Go Language</li>\n<li>Latest GoLang version installed on your system</li>\n<li>A few minutes of your time.</li>\n</ul>\n<p>In this blog, we’ll look at different methods to send an email with Go, First, we will explore inbuilt <strong><a href=\"https://golang.org/pkg/net/smtp/\">smtp package</a></strong>, then we will move to use a popular package <strong><a href=\"https://github.com/go-gomail/gomail\">Gomail</a></strong> and finally, we will send <strong>HTML emails</strong> using custom templates.</p>\n<h2 id=\"package-smtp\" style=\"position:relative;\"><a href=\"#package-smtp\" aria-label=\"package smtp 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>Package smtp</h2>\n<p><strong>smtp</strong> is an inbuilt package provided with Golang. It implements the Simple Mail Transfer Protocol and has multiple functionalities related to it. Here to send the email we will be using only two functions <strong>PlainAuth</strong> and <em>SendMail</em> from the package.</p>\n<blockquote>\n<p>Note: <a href=\"https://compile7.org/decompile/go-functions-with-examples/\">Click here for an overview on Go Functions</a></p>\n</blockquote>\n<ul>\n<li><strong>PlainAuth</strong>: It uses the given username and password to authenticate to host and return an identity</li>\n<li><strong>SendMail</strong>: It connects to the server at address, switches to TLS if possible, authenticates with the optional mechanism an if possible, and then sends an email to the sender.</li>\n</ul>\n<p>Below is the complete code to send a plain text email with smtp package in golang.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"go\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">package</span><span class=\"mtk1\"> main</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">import</span><span class=\"mtk1\"> (</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk8\">&quot;fmt&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk8\">&quot;net/smtp&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">func</span><span class=\"mtk1\"> </span><span class=\"mtk11\">main</span><span class=\"mtk1\">() {</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Sender data.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">from</span><span class=\"mtk1\"> := </span><span class=\"mtk8\">&quot;from@gmail.com&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">password</span><span class=\"mtk1\"> := </span><span class=\"mtk8\">&quot;&lt;Email Password&gt;&quot;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Receiver email address.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">to</span><span class=\"mtk1\"> := []</span><span class=\"mtk10\">string</span><span class=\"mtk1\">{</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk8\">&quot;sender@example.com&quot;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// smtp server configuration.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">smtpHost</span><span class=\"mtk1\"> := </span><span class=\"mtk8\">&quot;smtp.gmail.com&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">smtpPort</span><span class=\"mtk1\"> := </span><span class=\"mtk8\">&quot;587&quot;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Message.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">message</span><span class=\"mtk1\"> := []</span><span class=\"mtk11\">byte</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;This is a test email message.&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Authentication.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">auth</span><span class=\"mtk1\"> := smtp.</span><span class=\"mtk11\">PlainAuth</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;&quot;</span><span class=\"mtk1\">, from, password, smtpHost)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Sending email.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">err</span><span class=\"mtk1\"> := smtp.</span><span class=\"mtk11\">SendMail</span><span class=\"mtk1\">(smtpHost+</span><span class=\"mtk8\">&quot;:&quot;</span><span class=\"mtk1\">+smtpPort, auth, from, to, message)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> err != </span><span class=\"mtk4\">nil</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    fmt.</span><span class=\"mtk11\">Println</span><span class=\"mtk1\">(err)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">return</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  fmt.</span><span class=\"mtk11\">Println</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Email Sent Successfully!&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<blockquote>\n<p>In the above code example we have used smtp details of a Gmail account, you should update the smtp detail according to your email provider.</p>\n</blockquote>\n<blockquote>\n<p>Just to explain things easily, In the above snippet, we have written all the smtp and email credentials in the main function, Though in a production app you should always use env variables for configurations. You can check <a href=\"https://github.com/spf13/viper\">Viper</a> to manage configurations in production apps.</p>\n</blockquote>\n<h2 id=\"package-gomail\" style=\"position:relative;\"><a href=\"#package-gomail\" aria-label=\"package gomail 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>Package Gomail</h2>\n<p>Below is the complete code to send a plain text email with Gomail package in golang.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"go\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">package</span><span class=\"mtk1\"> main</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">import</span><span class=\"mtk1\"> (</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk8\">&quot;crypto/tls&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk8\">&quot;fmt&quot;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  gomail </span><span class=\"mtk8\">&quot;gopkg.in/mail.v2&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">func</span><span class=\"mtk1\"> </span><span class=\"mtk11\">main</span><span class=\"mtk1\">() {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">m</span><span class=\"mtk1\"> := gomail.</span><span class=\"mtk11\">NewMessage</span><span class=\"mtk1\">()</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Set E-Mail sender</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  m.</span><span class=\"mtk11\">SetHeader</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;From&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;from@gmail.com&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Set E-Mail receivers</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  m.</span><span class=\"mtk11\">SetHeader</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;To&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;to@example.com&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Set E-Mail subject</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  m.</span><span class=\"mtk11\">SetHeader</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Subject&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;Gomail test subject&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Set E-Mail body. You can set plain text or html with text/html</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  m.</span><span class=\"mtk11\">SetBody</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;text/plain&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;This is Gomail test body&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Settings for SMTP server</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">d</span><span class=\"mtk1\"> := gomail.</span><span class=\"mtk11\">NewDialer</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;smtp.gmail.com&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk7\">587</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;from@gmail.com&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;&lt;email_password&gt;&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// This is only needed when SSL/TLS certificate is not valid on server.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// In production this should be set to false.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">d.TLSConfig</span><span class=\"mtk1\"> = &tls.Config{InsecureSkipVerify: </span><span class=\"mtk4\">true</span><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Now send E-Mail</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> </span><span class=\"mtk12\">err</span><span class=\"mtk1\"> := d.</span><span class=\"mtk11\">DialAndSend</span><span class=\"mtk1\">(m); err != </span><span class=\"mtk4\">nil</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    fmt.</span><span class=\"mtk11\">Println</span><span class=\"mtk1\">(err)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk11\">panic</span><span class=\"mtk1\">(err)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<h2 id=\"custom-html-templates\" style=\"position:relative;\"><a href=\"#custom-html-templates\" aria-label=\"custom html templates 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>Custom HTML Templates</h2>\n<p>Now, let's send an HTML email with smtp package, for this, we need to create two files in the root folder.</p>\n<ul>\n<li>main.go: go code to parse HTML template and send it in email</li>\n<li>template.html : HTML template for emails</li>\n</ul>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"html\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!-- </span><span class=\"mtk12\">template</span><span class=\"mtk1\">.</span><span class=\"mtk12\">html</span><span class=\"mtk1\"> --&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!</span><span class=\"mtk12\">DOCTYPE</span><span class=\"mtk1\"> </span><span class=\"mtk12\">html</span><span class=\"mtk1\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">html</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">body</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">h3</span><span class=\"mtk17\">&gt;</span><span class=\"mtk1\">Name:</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">h3</span><span class=\"mtk17\">&gt;&lt;</span><span class=\"mtk4\">span</span><span class=\"mtk17\">&gt;</span><span class=\"mtk4\">{</span><span class=\"mtk1\">{.</span><span class=\"mtk12\">Name</span><span class=\"mtk1\">}</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">span</span><span class=\"mtk17\">&gt;&lt;</span><span class=\"mtk4\">br</span><span class=\"mtk17\">/&gt;&lt;</span><span class=\"mtk4\">br</span><span class=\"mtk17\">/&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">h3</span><span class=\"mtk17\">&gt;</span><span class=\"mtk1\">Email:</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">h3</span><span class=\"mtk17\">&gt;&lt;</span><span class=\"mtk4\">span</span><span class=\"mtk17\">&gt;</span><span class=\"mtk4\">{</span><span class=\"mtk1\">{.</span><span class=\"mtk12\">Message</span><span class=\"mtk1\">}</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">span</span><span class=\"mtk17\">&gt;&lt;</span><span class=\"mtk4\">br</span><span class=\"mtk17\">/&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">body</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">html</span><span class=\"mtk17\">&gt;</span></span></code></pre>\n<p>We are using <a href=\"https://golang.org/pkg/text/template/\">text/template</a> package to parse HTML files and use it in smtp SendMail function.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"go\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">package</span><span class=\"mtk1\"> main</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">import</span><span class=\"mtk1\"> (</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk8\">&quot;bytes&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk8\">&quot;fmt&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk8\">&quot;net/smtp&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk8\">&quot;text/template&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">func</span><span class=\"mtk1\"> </span><span class=\"mtk11\">main</span><span class=\"mtk1\">() {</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Sender data.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">from</span><span class=\"mtk1\"> := </span><span class=\"mtk8\">&quot;from@gmail.com&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">password</span><span class=\"mtk1\"> := </span><span class=\"mtk8\">&quot;&lt;Email Password&gt;&quot;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Receiver email address.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">to</span><span class=\"mtk1\"> := []</span><span class=\"mtk10\">string</span><span class=\"mtk1\">{</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk8\">&quot;sender@example.com&quot;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// smtp server configuration.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">smtpHost</span><span class=\"mtk1\"> := </span><span class=\"mtk8\">&quot;smtp.gmail.com&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">smtpPort</span><span class=\"mtk1\"> := </span><span class=\"mtk8\">&quot;587&quot;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Authentication.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">auth</span><span class=\"mtk1\"> := smtp.</span><span class=\"mtk11\">PlainAuth</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;&quot;</span><span class=\"mtk1\">, from, password, smtpHost)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">t</span><span class=\"mtk1\">, </span><span class=\"mtk12\">_</span><span class=\"mtk1\"> := template.</span><span class=\"mtk11\">ParseFiles</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;template.html&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">body</span><span class=\"mtk1\"> bytes.Buffer</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">mimeHeaders</span><span class=\"mtk1\"> := </span><span class=\"mtk8\">&quot;MIME-version: 1.0;</span><span class=\"mtk6\">\\n</span><span class=\"mtk8\">Content-Type: text/html; charset=</span><span class=\"mtk6\">\\&quot;</span><span class=\"mtk8\">UTF-8</span><span class=\"mtk6\">\\&quot;</span><span class=\"mtk8\">;</span><span class=\"mtk6\">\\n\\n</span><span class=\"mtk8\">&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  body.</span><span class=\"mtk11\">Write</span><span class=\"mtk1\">([]</span><span class=\"mtk11\">byte</span><span class=\"mtk1\">(fmt.</span><span class=\"mtk11\">Sprintf</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Subject: This is a test subject </span><span class=\"mtk6\">\\n</span><span class=\"mtk8\">%s</span><span class=\"mtk6\">\\n\\n</span><span class=\"mtk8\">&quot;</span><span class=\"mtk1\">, mimeHeaders)))</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  t.</span><span class=\"mtk11\">Execute</span><span class=\"mtk1\">(&body, </span><span class=\"mtk4\">struct</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    Name    </span><span class=\"mtk10\">string</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    Message </span><span class=\"mtk10\">string</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }{</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    Name:    </span><span class=\"mtk8\">&quot;Puneet Singh&quot;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    Message: </span><span class=\"mtk8\">&quot;This is a test message in a HTML template&quot;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  })</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Sending email.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">err</span><span class=\"mtk1\"> := smtp.</span><span class=\"mtk11\">SendMail</span><span class=\"mtk1\">(smtpHost+</span><span class=\"mtk8\">&quot;:&quot;</span><span class=\"mtk1\">+smtpPort, auth, from, to, body.</span><span class=\"mtk11\">Bytes</span><span class=\"mtk1\">())</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> err != </span><span class=\"mtk4\">nil</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    fmt.</span><span class=\"mtk11\">Println</span><span class=\"mtk1\">(err)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">return</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  fmt.</span><span class=\"mtk11\">Println</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Email Sent!&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<p>Once done you need to run below command to send the emails</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">go run main.go</span></code></pre>\n<blockquote>\n<p>If you don't want to create your custom HTML emails, <a href=\"https://github.com/matcornic/hermes\">Hermes</a> is a package that generates clean, responsive HTML e-mails for sending transactional e-mails.</p>\n</blockquote>\n<p>Now you can send beautiful emails to the customer by your golang application, You can found the complete code used in this blog on our <a href=\"https://github.com/LoginRadius/engineering-blog-samples/tree/master/GoLang/DifferentWaysToSendEmail\">Github Repo</a></p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\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  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\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-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk3 { color: #6A9955; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk10 { color: #4EC9B0; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n  .dark-default-dark .mtk7 { color: #B5CEA8; }\n  .dark-default-dark .mtk17 { color: #808080; }\n  .dark-default-dark .mtk6 { color: #D7BA7D; }\n</style>","frontmatter":{"date":"August 03, 2020","updated_date":null,"description":"In this blog, we’ll look at different methods to send an email with Go, First we will explore inbuilt smtp package, then we will move to use a popular package Gomail and finally we will send HTML emails using custom templates.","title":"Different ways to send an email with Golang","tags":["Go","Email"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/8c5f2a8ca4c0d8c2e442b0b5b909e070/58556/email_cover.webp","srcSet":"/static/8c5f2a8ca4c0d8c2e442b0b5b909e070/61e93/email_cover.webp 200w,\n/static/8c5f2a8ca4c0d8c2e442b0b5b909e070/1f5c5/email_cover.webp 400w,\n/static/8c5f2a8ca4c0d8c2e442b0b5b909e070/58556/email_cover.webp 800w,\n/static/8c5f2a8ca4c0d8c2e442b0b5b909e070/99238/email_cover.webp 1200w,\n/static/8c5f2a8ca4c0d8c2e442b0b5b909e070/7c22d/email_cover.webp 1600w,\n/static/8c5f2a8ca4c0d8c2e442b0b5b909e070/685a2/email_cover.webp 1800w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Puneet Singh","github":"puneetsingh24","avatar":null}}}},{"node":{"excerpt":"Snapshot Testing Snapshot tests as the name implies, is a very powerful tool to test whether you the UI has change or not. A typical…","fields":{"slug":"/engineering/snapshot-testing-using-nightwatch-and-mocha/"},"html":"<h3 id=\"snapshot-testing\" style=\"position:relative;\"><a href=\"#snapshot-testing\" aria-label=\"snapshot testing 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>Snapshot Testing</h3>\n<p><strong>Snapshot tests</strong> as the name implies, is a very powerful tool to test whether you the UI has change or not. A typical <strong>snapshot test</strong> case for a website/mobile app renders a UI component, takes a <strong>snapshot</strong>, then compares it to a reference <strong>snapshot</strong> file stored alongside the <strong>test</strong>.</p>\n<h3 id=\"snapshot-testing--benefits\" style=\"position:relative;\"><a href=\"#snapshot-testing--benefits\" aria-label=\"snapshot testing  benefits 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>Snapshot Testing  Benefits</h3>\n<h4 id=\"for-qa-manual-and-automation\" style=\"position:relative;\"><a href=\"#for-qa-manual-and-automation\" aria-label=\"for qa manual and automation 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>For QA Manual And Automation</h4>\n<ul>\n<li>Easy to identify any change in the DOM element.</li>\n<li>Help to automation to check element id as same as previous.</li>\n<li>Help to check integration testing will be in right.</li>\n</ul>\n<h4 id=\"for-developer-unit-testing\" style=\"position:relative;\"><a href=\"#for-developer-unit-testing\" aria-label=\"for developer unit testing 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>For Developer Unit Testing</h4>\n<ul>\n<li>The developer can compare snapshot dom on every movement when the dynamic change happened on DOM.</li>\n<li>Get changes in DOM and update QA for update automation testing products.</li>\n</ul>\n<p>Need to install <strong>NPM</strong></p>\n<ol>\n<li>npm i mocha</li>\n<li>npm i clean-html</li>\n<li>npm i snap-shot</li>\n<li>npm i jsdom</li>\n<li>npm i jsdom-global</li>\n</ol>\n<blockquote>\n<p> <strong>NightWatch</strong> does not have snapshot feature. So, We will use <strong>mocha</strong> to take snapshots. But <strong>Mocha will be run by NightWatch.</strong></p>\n</blockquote>\n<h3 id=\"directory-structure\" style=\"position:relative;\"><a href=\"#directory-structure\" aria-label=\"directory structure 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>Directory Structure</h3>\n<p>As per over automation project. We have created a \"snapshot\" folder under the \"test\" folder and we will be following the same structure as per the below project menu bar. </p>\n<p><a href=\"https://cdn.filestackcontent.com/solmjUZXTPWZgTNppBmW\"><img src=\"https://cdn.filestackcontent.com/solmjUZXTPWZgTNppBmW\" alt=\"N|Solid\"></a></p>\n<p>We also need to add Mocha test files, which will use to take snapshot and store under the root folder \"__snapshots__\".</p>\n<p><img src=\"https://cdn.filestackcontent.com/XGkI0wDrQoGDSp2djINg\" alt=\"(https://cdn.filestackcontent.com/XGkI0wDrQoGDSp2djINg)\"></p>\n<p>If you are running automation code via visual code editor, then you can setup a launch.json file which helps you to debug your test code with all file/individual file.</p>\n<p>You can see the settings below of the launch.json file.</p>\n<p><img src=\"https://cdn.filestackcontent.com/qDjAHwHIQtKp2hmBdaEn\" alt=\"(https://cdn.filestackcontent.com/qDjAHwHIQtKp2hmBdaEn)\"></p>\n<hr>\n<h4 id=\"update-snapshot\" style=\"position:relative;\"><a href=\"#update-snapshot\" aria-label=\"update snapshot 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>Update Snapshot</h4>\n<p>After creating a snapshot, sometimes we need to update snapshot due to improvement, customer requirements, and any valid changes on UI. So here, we can have some other settings which  will help us.</p>\n<ol>\n<li>\n<p>If we want to update all snapshots by single command then we need to follow below instruction.</p>\n<p>Create a root folder file(update_snapshot.js) and paste code on it.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">(</span><span class=\"mtk4\">function</span><span class=\"mtk1\">(){</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk12\">process</span><span class=\"mtk1\">.</span><span class=\"mtk12\">env</span><span class=\"mtk1\">.</span><span class=\"mtk12\">UPDATE</span><span class=\"mtk1\">\\=</span><span class=\"mtk7\">1</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})()</span></span></code></pre>\n<p>Add in package.json</p>\n<p>  <img src=\"https://cdn.filestackcontent.com/TTvchMDTW6F5x87J0688\" alt=\"(https://cdn.filestackcontent.com/TTvchMDTW6F5x87J0688)\"> </p>\n</li>\n</ol>\n<blockquote>\n<p>We can update all snapshot by using → <code>npm run snapshot-u</code></p>\n</blockquote>\n<ol start=\"2\">\n<li>If we want to update the single snapshot then we can use the above technique but we just need to update the file name against \"test/snapshot\".</li>\n<li>\n<p>If we use vscode, then we need to update launch.json as per above information </p>\n<p>  <img src=\"https://cdn.filestackcontent.com/uWX0pIUaSzKFyVKJGIYB\" alt=\"(https://cdn.filestackcontent.com/uWX0pIUaSzKFyVKJGIYB)\"></p>\n<p>  and need to create a file(\"snapshot.config.js\") in the root folder and paste the below code.</p>\n<p>  <img src=\"https://cdn.filestackcontent.com/Hh3PNxKmSo2pSFRA9YeM\" alt=\"(https://cdn.filestackcontent.com/Hh3PNxKmSo2pSFRA9YeM)\"></p>\n</li>\n</ol>\n<blockquote>\n<p>Important-: If we want to run only a snapshot test then we will need a small change in the nightwatch.json file.</p>\n</blockquote>\n<p><img src=\"https://cdn.filestackcontent.com/EkBrPZffRv2ElZ0Qez36\" alt=\"(https://cdn.filestackcontent.com/EkBrPZffRv2ElZ0Qez36)\"></p>\n<p>You can find the complete reposrtory link <a href=\"https://github.com/niteshjain1987/NightWatch-Snapshot\">here</a></p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\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  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\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-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk7 { color: #B5CEA8; }\n</style>","frontmatter":{"date":"July 29, 2020","updated_date":null,"description":"Snapshot testing is one of many different testing tools, which compares the previous and current snapshot. Unlike TDD, snapshot testing relies on the fact that your component renders correctly already. ","title":"Snapshot testing using Nightwatch and mocha","tags":["QA","Nightwatch","snapshot-testing"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.7699115044247788,"src":"/static/858d55e4f691f5e5780be7675877f12d/58556/snapshot_nightwatch.webp","srcSet":"/static/858d55e4f691f5e5780be7675877f12d/61e93/snapshot_nightwatch.webp 200w,\n/static/858d55e4f691f5e5780be7675877f12d/1f5c5/snapshot_nightwatch.webp 400w,\n/static/858d55e4f691f5e5780be7675877f12d/58556/snapshot_nightwatch.webp 800w,\n/static/858d55e4f691f5e5780be7675877f12d/99238/snapshot_nightwatch.webp 1200w,\n/static/858d55e4f691f5e5780be7675877f12d/135cd/snapshot_nightwatch.webp 1280w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Nitesh Jain","github":"niteshjain1987","avatar":null}}}}]},"markdownRemark":{"excerpt":"Identity is evolving, and developers are at the forefront of this transformation. Every day brings a new learning—adapting to new standards…","fields":{"slug":"/identity/developer-first-identity-provider-loginradius/"},"html":"<p>Identity is evolving, and developers are at the forefront of this transformation. Every day brings a new learning—adapting to new standards and refining approaches to building secure, seamless experiences.</p>\n<p>We’re here to support developers on that journey. We know how important simplicity, efficiency, and well-structured documentation are when working with identity and access management solutions. That’s why we’ve redesigned the <a href=\"https://www.loginradius.com/\">LoginRadius website</a>—to be faster, more intuitive, and developer-first in every way.</p>\n<p>The goal? Having them spend less time searching and more time building.</p>\n<h2 id=\"whats-new-and-improved-on-the-loginradius-website\" style=\"position:relative;\"><a href=\"#whats-new-and-improved-on-the-loginradius-website\" aria-label=\"whats new and improved on the loginradius website 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>What’s New and Improved on the LoginRadius Website?</h2>\n<p>LoginRadius’ vision is to give developers a product that simplifies identity management so they can focus on building, deploying, and scaling their applications. To enhance this experience, we’ve spent the last few months redesigning our interface— making navigation more intuitive and reassuring that essential resources are easily accessible.</p>\n<p>Here’s a closer look at what’s new and why it’s important:</p>\n<h3 id=\"a-developer-friendly-dark-theme\" style=\"position:relative;\"><a href=\"#a-developer-friendly-dark-theme\" aria-label=\"a developer friendly dark theme 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>A Developer-Friendly Dark Theme</h3>\n<p><img src=\"/f46881583c7518a93bb24e94c32320de/a-developer-friendly-dark-theme.webp\" alt=\"This image shows how LoginRadius offers several authentication methods like traditional login, social login, passwordless login, passkeys and more in a dark mode.\">    </p>\n<p>Developers spend long hours working in dark-themed IDEs and terminals, so we’ve designed the LoginRadius experience to be developer-friendly and align with that preference.</p>\n<p>The new dark mode reduces eye strain, enhances readability, and provides a seamless transition between a coding environment and our platform. Our new design features a clean, modern aesthetic with a consistent color scheme and Barlow typography, ensuring better readability. High-quality graphics and icons are thoughtfully placed to enhance the content without adding visual clutter.</p>\n<p>So, whether you’re navigating our API docs or configuring authentication into your system, our improved interface will make those extended development hours more comfortable and efficient.</p>\n<h3 id=\"clear-categorization-for-loginradius-capabilities\" style=\"position:relative;\"><a href=\"#clear-categorization-for-loginradius-capabilities\" aria-label=\"clear categorization for loginradius capabilities 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>Clear Categorization for LoginRadius Capabilities</h3>\n<p><img src=\"/e5358b82be414940f3fb146013845933/capabilities.webp\" alt=\"This image shows a breakdown of all the LoginRadius CIAM capabilities, including authentication, security, UX, scalability and multi-brand management.\"></p>\n<p>We’ve restructured our website to provide a straightforward breakdown of our customer identity and access management platform capabilities, helping you quickly find what you need:</p>\n<ul>\n<li>Authentication: Easily understand <a href=\"https://www.loginradius.com/blog/identity/authentication-option-for-your-product/\">how to choose the right login method</a>, from traditional passwords and OTPs to social login, federated SSO, and passkeys with few lines of code.</li>\n<li>Security: Implement no-code security features like bot detection, IP throttling, breached password alerts, DDoS protection, and adaptive MFA to safeguard user accounts.</li>\n<li>User Experience: Leverage AI builder, hosted pages, and drag-and-drop workflows to create smooth, branded sign-up and login experiences.</li>\n<li>High Performance &#x26; Scalability: Confidently scale with sub-100ms API response times, 100% uptime, 240K+ RPS, and 28+ global data center regions.</li>\n<li>Multi-Brand Management: Efficiently manage multiple identity apps, choosing isolated or shared data stores based on your brand’s unique needs.</li>\n</ul>\n<p>This structured layout ensures you can quickly understand each capability and how it integrates into your identity ecosystem.</p>\n<h3 id=\"developer-first-navigation\" style=\"position:relative;\"><a href=\"#developer-first-navigation\" aria-label=\"developer first navigation 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>Developer-First Navigation</h3>\n<p><img src=\"/a8c155c2b6faf3d5f4b4de4e2b14d763/developers-menu.webp\" alt=\"This image shows the LoginRadius menu bar, highlighting the developer dropdown.\">   </p>\n<p>We’ve been analyzing developer workflows to identify how you access key resources. That’s why we redesigned our navigation with one goal in mind: to reduce clicks and make essential resources readily available.</p>\n<p>The new LoginRadius structure puts APIs, SDKs, and integration guides right at the menu bar under the Developers dropdown so you can get started faster. Our Products, Solutions, and Customer Services are also clearly categorized, helping development teams quickly find the right tools and make informed decisions.</p>\n<h3 id=\"quick-understanding-of-integration-benefits\" style=\"position:relative;\"><a href=\"#quick-understanding-of-integration-benefits\" aria-label=\"quick understanding of integration benefits 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>Quick Understanding of Integration Benefits</h3>\n<p><img src=\"/b2f9a964a2da0ea83e2f8596b833bba7/we-support-your-tech-stack.webp\" alt=\"This image shows a list of popular programming languages and frameworks offered by LoginRadius.\"></p>\n<p>Developers now have a clear view of the tech stack available with LoginRadius, designed to support diverse business needs.</p>\n<p>Our platform offers pre-built SDKs for Node.js, Python, Java, and more, making CIAM integration seamless across popular programming languages and frameworks.</p>\n<h2 id=\"over-to-you-now\" style=\"position:relative;\"><a href=\"#over-to-you-now\" aria-label=\"over to you now 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>Over to You Now!</h2>\n<p>Check out our <a href=\"https://www.loginradius.com/\">revamped LoginRadius website</a> and see how the improved experience makes it easier to build, scale, and secure your applications.</p>\n<p>Do not forget to explore the improved navigation and API documentation, and get started with our free trial today. We’re excited to see what you’ll build with LoginRadius!</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\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  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\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-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"February 21, 2025","updated_date":null,"description":"LoginRadius’ vision is to give developers a product that simplifies identity management so they can focus on building, deploying, and scaling their applications. To enhance this experience, we’ve redesigned our website interface, making navigation more intuitive and reassuring that essential resources are easily accessible.","title":"Revamped & Ready: Introducing the New Developer-First LoginRadius Website","tags":["Developer tools","API","Identity Management","User Authentication"],"pinned":true,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.7857142857142858,"src":"/static/80b4e4fbe176a10a327d273504607f32/58556/hero-section.webp","srcSet":"/static/80b4e4fbe176a10a327d273504607f32/61e93/hero-section.webp 200w,\n/static/80b4e4fbe176a10a327d273504607f32/1f5c5/hero-section.webp 400w,\n/static/80b4e4fbe176a10a327d273504607f32/58556/hero-section.webp 800w,\n/static/80b4e4fbe176a10a327d273504607f32/99238/hero-section.webp 1200w,\n/static/80b4e4fbe176a10a327d273504607f32/7c22d/hero-section.webp 1600w,\n/static/80b4e4fbe176a10a327d273504607f32/1258b/hero-section.webp 2732w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Rakesh Soni","github":"oyesoni","avatar":"rakesh-soni.webp"}}}},"pageContext":{"limit":6,"skip":756,"currentPage":127,"type":"///","numPages":164,"pinned":"ee8a4479-3471-53b1-bf62-d0d8dc3faaeb"}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}