{"componentChunkName":"component---src-templates-blog-list-template-js","path":"/155","result":{"data":{"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Are you afraid of hackers and feel unsafe for admin and front user to login through same area? No need to worry as in this article, I am…","fields":{"slug":"/engineering/separate-login-page-for-admin-and-user/"},"html":"<p>Are you afraid of hackers and feel unsafe for admin and front user to login through same area?<br>\nNo need to worry as in this article, I am going to guide you with how to create separate login area for admin. Along with that, I will also provide the required steps to disable administrator login through user/login page.</p>\n<p>Please follow the following implementation steps.</p>\n<p><strong>Step by step Guide:</strong></p>\n<ol>\n<li>In the first step, you need to implement <a href=\"https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_menu/7.x\">hook_menu</a> in your module file.</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"php\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk11\">t</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Admin Login Page&#39;</span><span class=\"mtk1\">),</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk8\">&#39;page callback&#39;</span><span class=\"mtk1\"> =&gt; </span><span class=\"mtk8\">&#39;yourmodule_admin_login_page&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk8\">&#39;page arguments&#39;</span><span class=\"mtk1\"> =&gt; </span><span class=\"mtk11\">array</span><span class=\"mtk1\">(),</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk8\">&#39;access arguments&#39;</span><span class=\"mtk1\"> =&gt; </span><span class=\"mtk11\">array</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;access content&#39;</span><span class=\"mtk1\">),</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk8\">&#39;type&#39;</span><span class=\"mtk1\"> =&gt; MENU_CALLBACK,</span></span>\n<span class=\"grvsc-line\"><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=\"mtk12\">$menu_items</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}--&gt;</span></span></code></pre>\n<ol start=\"2\">\n<li>After adding menu in module file, the next step is to define the page callback function yourmodule<em>admin</em>login_page. In this function, we’ll define the layout of admin login page using theme.</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"php\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">function</span><span class=\"mtk1\"> </span><span class=\"mtk11\">yourmodule_admin_login_page</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=\"mtk11\">theme</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;yourmodule_admin_login_template&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<ol start=\"3\">\n<li>Now that you have defined page callback function, the next step is to implement hook_theme in your module file.</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"php\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk11\">array</span><span class=\"mtk1\">(</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk8\">&#39;template&#39;</span><span class=\"mtk1\"> =&gt; </span><span class=\"mtk8\">&#39;yourmodule-admin_login&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk8\">&#39;render element&#39;</span><span class=\"mtk1\"> =&gt; </span><span class=\"mtk8\">&#39;form&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk8\">&#39;path&#39;</span><span class=\"mtk1\"> =&gt; </span><span class=\"mtk12\">$path</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=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk12\">$theme</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}--&gt;</span></span></code></pre>\n<ol start=\"4\">\n<li>After implementation of hook theme in module file, the next step is to implement preprocess function for template file.</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"php\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;hidden&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk8\">&#39;#value&#39;</span><span class=\"mtk1\"> =&gt; </span><span class=\"mtk8\">&#39;admin_login&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk8\">&#39;#name&#39;</span><span class=\"mtk1\"> =&gt; </span><span class=\"mtk8\">&#39;hidden_admin_login_form&#39;</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=\"mtk12\">$variables</span><span class=\"mtk1\">[</span><span class=\"mtk8\">&#39;rendered&#39;</span><span class=\"mtk1\">] = </span><span class=\"mtk11\">drupal_render</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$form</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}--&gt;</span></span></code></pre>\n<p><strong>Note</strong> : In the above code, we have used the hidden element to identify the admin login page.</p>\n<ol start=\"5\">\n<li>After adding menu in module file, the next step is to define the page callback function yourmodule_admin_login_page. In this function, we’ll define the layout of admin login page using theme.</li>\n</ol>\n<p>'yourmodule-admin_login.tpl.php'</p>\n<ol start=\"6\">\n<li>Now paste the following code in yourmodule-admin_login.tpl.php file.</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"php\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!--</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">--&gt;</span></span></code></pre>\n<ol start=\"7\">\n<li>After that, clear your website’s cache and check the following url for your admin login page</li>\n</ol>\n<p>URL : <strong>your-site-domain/admin/login</strong></p>\n<p>All above steps are used to show admin login page. But if you want that only administrator can login through page admin/login then follow the following the next steps.</p>\n<ol>\n<li>In this step, you need to implement <a href=\"https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_form_alter/7.x\">hook_form_alter</a> function. In this function we will add custom validation.</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"php\" data-index=\"5\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">function</span><span class=\"mtk1\"> </span><span class=\"mtk11\">yourmodule_form_alter</span><span class=\"mtk1\">(&amp;</span><span class=\"mtk12\">$form</span><span class=\"mtk1\">, &amp;</span><span class=\"mtk12\">$form_state</span><span class=\"mtk1\">,</span><span class=\"mtk12\"> $form_id</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">$form_id</span><span class=\"mtk1\"> == </span><span class=\"mtk8\">&#39;user_login&#39;</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$form</span><span class=\"mtk1\">[</span><span class=\"mtk8\">&#39;#validate&#39;</span><span class=\"mtk1\">][] = </span><span class=\"mtk8\">&#39;yourmodule_external_validate&#39;</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></code></pre>\n<ol start=\"2\">\n<li>After that, add the following code to define the custom validation in which only administrator can login.</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"php\" data-index=\"6\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">roles);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">$access_granted</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=\"mtk4\">TRUE</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=\"mtk15\">else</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk11\">form_set_error</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk11\">t</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Only site administrator can login.&#39;</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=\"mtk4\">FALSE</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=\"mtk1\">}--&gt;</span></span></code></pre>\n<p><strong>Note</strong>: If you want that administrator can’t login through user login page then add following code to do this.</p>\n<p>Add the mentioned code in function <strong>yourmodule_external_validate</strong></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"php\" data-index=\"7\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">roles);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">$user_access_granted</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk11\">form_set_error</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk11\">t</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Only front user can login.&#39;</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=\"mtk4\">FALSE</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=\"mtk15\">else</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=\"mtk4\">TRUE</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}--&gt;</span></span></code></pre>\n<p>Complete code of function yourmodule_external_validate looks like:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"php\" data-index=\"8\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">roles);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">$access_granted</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=\"mtk4\">TRUE</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=\"mtk15\">else</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk11\">form_set_error</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk11\">t</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Only site administrator can login.&#39;</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=\"mtk4\">FALSE</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=\"mtk1\">  </span><span class=\"mtk15\">else</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$user</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">user_load</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$form_state</span><span class=\"mtk1\">[</span><span class=\"mtk8\">&#39;uid&#39;</span><span class=\"mtk1\">]);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$user_access_granted</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">in_array</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;administrator&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">$user</span><span class=\"mtk1\">-&gt;</span><span class=\"mtk12\">roles</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">$user_access_granted</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk11\">form_set_error</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk11\">t</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Only front user can login.&#39;</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=\"mtk4\">FALSE</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=\"mtk15\">else</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=\"mtk4\">TRUE</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=\"mtk1\">}--&gt;</span></span></code></pre>\n<p>If you are searching over the web and can’t find anything to create separate admin login page in drupal, Please follow the mentioned above steps and you are done. Also create different layout for this  admin login page.</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 .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n</style>","frontmatter":{"date":"October 29, 2015","updated_date":null,"description":null,"title":"Separate Drupal Login Page for Admin and User","tags":["Drupal","Admin Panel"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.9047619047619047,"src":"/static/1946d03fb98b01c53c55a9c4b72a0ab8/ee604/drupal.png","srcSet":"/static/1946d03fb98b01c53c55a9c4b72a0ab8/69585/drupal.png 200w,\n/static/1946d03fb98b01c53c55a9c4b72a0ab8/497c6/drupal.png 400w,\n/static/1946d03fb98b01c53c55a9c4b72a0ab8/ee604/drupal.png 800w,\n/static/1946d03fb98b01c53c55a9c4b72a0ab8/f3583/drupal.png 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Versha Gupta","github":"vershagupta","avatar":null}}}},{"node":{"excerpt":"This tutorial provides a solution to get email alerts, when a unhandled error occurs. For this tutorial, we are using WordPress. Imagine you…","fields":{"slug":"/engineering/how-to-get-email-alerts-for-unhandled-php-exceptions/"},"html":"<p>This tutorial provides a solution to get email alerts, when a unhandled error occurs. For this tutorial, we are using WordPress.</p>\n<p>Imagine you created a php application and it’s running fine.  A couple of days later, a user complains about an error which you’re totally unaware of. Such unhandled errors are very common in php applications. So, to find these issues, we are going to send email notifications whenever an error occurs.</p>\n<p><strong>Step 1.</strong> First of all we need to identify a common application file that include at top of application. in this case the file is “wp-config.php” at the root of your wordpress hosting directory.  </p>\n<p><strong>Step 2.</strong> Let’s add the following line of code in this file under php tag.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"php\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk11\">set_error_handler</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;errorHandler&#39;</span><span class=\"mtk1\">); </span><span class=\"mtk3\">// this line of code sets an error handler custom function to handle any php error. And here we pass our custom function that name “errorHandler”</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">function</span><span class=\"mtk1\"> </span><span class=\"mtk11\">createTable</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$array</span><span class=\"mtk1\">){</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">if</span><span class=\"mtk1\">(</span><span class=\"mtk11\">is_array</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$array</span><span class=\"mtk1\">) && </span><span class=\"mtk11\">count</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$array</span><span class=\"mtk1\">)&gt;</span><span class=\"mtk7\">0</span><span class=\"mtk1\">){</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk12\">$errorContent</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;&lt;table border = 1&gt;&lt;tr&gt;&lt;td&gt;&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk15\">foreach</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">$array</span><span class=\"mtk1\"> as </span><span class=\"mtk12\">$key</span><span class=\"mtk1\"> =&gt; </span><span class=\"mtk12\">$val</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">            </span><span class=\"mtk12\">$errorContent</span><span class=\"mtk1\"> .= </span><span class=\"mtk12\">$key</span><span class=\"mtk1\"> . </span><span class=\"mtk8\">&quot;&lt;/td&gt;&lt;td&gt;&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">            </span><span class=\"mtk15\">if</span><span class=\"mtk1\">(</span><span class=\"mtk11\">is_array</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$val</span><span class=\"mtk1\">) && </span><span class=\"mtk11\">count</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$val</span><span class=\"mtk1\">)&gt;</span><span class=\"mtk7\">0</span><span class=\"mtk1\">){</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                </span><span class=\"mtk12\">$errorContent</span><span class=\"mtk1\"> .= </span><span class=\"mtk11\">createTable</span><span class=\"mtk1\">(</span><span class=\"mtk11\">json_decode</span><span class=\"mtk1\">(</span><span class=\"mtk11\">json_encode</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$val</span><span class=\"mtk1\">),</span><span class=\"mtk4\">true</span><span class=\"mtk1\">)) ;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">            }</span><span class=\"mtk15\">else</span><span class=\"mtk1\">{</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                </span><span class=\"mtk12\">$errorContent</span><span class=\"mtk1\"> .= </span><span class=\"mtk11\">print_r</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$val</span><span class=\"mtk1\">, </span><span class=\"mtk4\">true</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=\"mtk1\">        </span><span class=\"mtk12\">$errorContent</span><span class=\"mtk1\"> .= </span><span class=\"mtk8\">&quot;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&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 class=\"mtk12\">$errorContent</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=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;&#39;</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=\"mtk3\">/**</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"> * </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"> * </span><span class=\"mtk4\">@param</span><span class=\"mtk3\"> </span><span class=\"mtk10\">type</span><span class=\"mtk3\"> $errorNumber        // This parameter returns error number.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"> * </span><span class=\"mtk4\">@param</span><span class=\"mtk3\"> </span><span class=\"mtk10\">type</span><span class=\"mtk3\"> $errorString           // This parameter returns error string.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"> * </span><span class=\"mtk4\">@param</span><span class=\"mtk3\"> </span><span class=\"mtk10\">type</span><span class=\"mtk3\"> $errorFile               // This parameter returns path of file in which error found.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"> * </span><span class=\"mtk4\">@param</span><span class=\"mtk3\"> </span><span class=\"mtk10\">type</span><span class=\"mtk3\"> $errorLine              // This parameter returns line number of file in which you get an error.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"> * </span><span class=\"mtk4\">@param</span><span class=\"mtk3\"> </span><span class=\"mtk10\">type</span><span class=\"mtk3\"> $errorContext         // This parameter return error context.</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"> */</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">function</span><span class=\"mtk1\"> </span><span class=\"mtk11\">errorHandler</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$errorNumber</span><span class=\"mtk1\">,</span><span class=\"mtk12\"> $errorString</span><span class=\"mtk1\">,</span><span class=\"mtk12\"> $errorFile</span><span class=\"mtk1\">,</span><span class=\"mtk12\"> $errorLine</span><span class=\"mtk1\">,</span><span class=\"mtk12\"> $errorContext</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$emailAddress</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&#39;example@example.com&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$emailSubject</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&#39;Error on my Application&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$emailMessage</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&#39;&lt;h2&gt;Error Reporting on :- &lt;/h2&gt;[&#39;</span><span class=\"mtk1\"> . </span><span class=\"mtk11\">date</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Y-m-d h:i:s&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk11\">time</span><span class=\"mtk1\">()) . </span><span class=\"mtk8\">&#39;]&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$emailMessage</span><span class=\"mtk1\"> .= </span><span class=\"mtk8\">&quot;&lt;h2&gt;Error Number :- &lt;/h2&gt;&quot;</span><span class=\"mtk1\">.</span><span class=\"mtk11\">print_r</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$errorNumber</span><span class=\"mtk1\">, </span><span class=\"mtk4\">true</span><span class=\"mtk1\">).</span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$emailMessage</span><span class=\"mtk1\"> .= </span><span class=\"mtk8\">&quot;&lt;h2&gt;Error String :- &lt;/h2&gt;&quot;</span><span class=\"mtk1\">.</span><span class=\"mtk11\">print_r</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$errorString</span><span class=\"mtk1\">, </span><span class=\"mtk4\">true</span><span class=\"mtk1\">).</span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$emailMessage</span><span class=\"mtk1\"> .= </span><span class=\"mtk8\">&quot;&lt;h2&gt;Error File :- &lt;/h2&gt;&quot;</span><span class=\"mtk1\">.</span><span class=\"mtk11\">print_r</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$errorFile</span><span class=\"mtk1\">, </span><span class=\"mtk4\">true</span><span class=\"mtk1\">).</span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$emailMessage</span><span class=\"mtk1\"> .= </span><span class=\"mtk8\">&quot;&lt;h2&gt;Error Line :- &lt;/h2&gt;&quot;</span><span class=\"mtk1\">.</span><span class=\"mtk11\">print_r</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$errorLine</span><span class=\"mtk1\">, </span><span class=\"mtk4\">true</span><span class=\"mtk1\">).</span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$emailMessage</span><span class=\"mtk1\"> .= </span><span class=\"mtk8\">&quot;&lt;h2&gt;Error Context :- &lt;/h2&gt;&quot;</span><span class=\"mtk1\">.</span><span class=\"mtk11\">createTable</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$errorContext</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$headers</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;MIME-Version: 1.0&quot;</span><span class=\"mtk1\"> . </span><span class=\"mtk8\">&quot;rn&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">$headers</span><span class=\"mtk1\"> .= </span><span class=\"mtk8\">&quot;Content-type:text/html;charset=UTF-8&quot;</span><span class=\"mtk1\"> . </span><span class=\"mtk8\">&quot;rn&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk11\">mail</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$emailAddress</span><span class=\"mtk1\">, </span><span class=\"mtk12\">$emailSubject</span><span class=\"mtk1\">, </span><span class=\"mtk12\">$emailMessage</span><span class=\"mtk1\">, </span><span class=\"mtk12\">$headers</span><span class=\"mtk1\">); </span><span class=\"mtk3\">// you may use SMTP, default php mail service OR other email sending process</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<p><strong>Step 3.</strong> Now save the file and upload on server.</p>\n<p>Whenever we got any error in wordpress then above code will send an email to given email-address (example@example.com). You can use the above code on production websites to improve application performance and track all errors that’s are missed.</p>\n<p>Similarly we can use above code in drupal, joomla, and many other content management systems.<br>\nCommon config files on other platforms are listed below:</p>\n<table>\n<thead>\n<tr>\n<th><strong>CMS/application name</strong></th>\n<th><strong>Location of common file</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>4Images Gallery</td>\n<td>/config.php</td>\n</tr>\n<tr>\n<td>B2 Evolution</td>\n<td>/conf/_basic_config.php</td>\n</tr>\n<tr>\n<td>Boonex Dolphin</td>\n<td>/inc/header.inc.php</td>\n</tr>\n<tr>\n<td>Concrete5</td>\n<td>/config/site.php</td>\n</tr>\n<tr>\n<td>Coppermine Photo Gallery</td>\n<td>/include/config.inc.php</td>\n</tr>\n<tr>\n<td>Crafty Syntax Live Help</td>\n<td>/config.php</td>\n</tr>\n<tr>\n<td>Cube Cart</td>\n<td>/includes/global.inc.php</td>\n</tr>\n<tr>\n<td>dotProject</td>\n<td>/includes/config.php</td>\n</tr>\n<tr>\n<td>Drupal</td>\n<td>/sites/default/settings.php</td>\n</tr>\n<tr>\n<td>e107</td>\n<td>/e107_config.php</td>\n</tr>\n<tr>\n<td>FAQMasterFlex</td>\n<td>/faq_config.php</td>\n</tr>\n<tr>\n<td>Gallery</td>\n<td>/config.php</td>\n</tr>\n<tr>\n<td>Geeklog</td>\n<td>/db-config.php or /siteconfig.php or /lib-common.php</td>\n</tr>\n<tr>\n<td>glfusion</td>\n<td>/private/db-config.php</td>\n</tr>\n<tr>\n<td>Hotaru</td>\n<td>/hotaru_settings.php</td>\n</tr>\n<tr>\n<td>Joomla</td>\n<td>/configuration.php</td>\n</tr>\n<tr>\n<td>LiveSite</td>\n<td>/livesite/config.php</td>\n</tr>\n<tr>\n<td>LifeType</td>\n<td>/config/config.properties.php</td>\n</tr>\n<tr>\n<td>Mambo</td>\n<td>/configuration.php</td>\n</tr>\n<tr>\n<td>Marketecture</td>\n<td>/include/config.php</td>\n</tr>\n<tr>\n<td>MODx</td>\n<td>/manager/includes/config.inc.php</td>\n</tr>\n<tr>\n<td>Moodle</td>\n<td>/config.php</td>\n</tr>\n<tr>\n<td>MyBB</td>\n<td>/inc/config.php</td>\n</tr>\n<tr>\n<td>Noahs Classifieds</td>\n<td>/app/config.php</td>\n</tr>\n<tr>\n<td>Nucleus</td>\n<td>/config.php</td>\n</tr>\n<tr>\n<td>ocPortal</td>\n<td>/info.php</td>\n</tr>\n<tr>\n<td>OpenCart</td>\n<td>/config.php or /admin/config.php</td>\n</tr>\n<tr>\n<td>osCommerce</td>\n<td>/includes/configure.php or /admin/includes/configure.php</td>\n</tr>\n<tr>\n<td>Oxwall</td>\n<td>/ow_includes/config.php</td>\n</tr>\n<tr>\n<td>PHP-Nuke</td>\n<td>/config.php</td>\n</tr>\n<tr>\n<td>phpBB</td>\n<td>/config.php</td>\n</tr>\n<tr>\n<td>phpFormGenerator</td>\n<td>/index.php or /mysql.class.php</td>\n</tr>\n<tr>\n<td>phpFreeChat</td>\n<td>/forms/admin/config.inc.php (only if you have saved form input to a database)</td>\n</tr>\n<tr>\n<td>PHPlist</td>\n<td>/config/config.php</td>\n</tr>\n<tr>\n<td>phpMyDirectory</td>\n<td>/defaults.php</td>\n</tr>\n<tr>\n<td>phpWCMS</td>\n<td>/include/inc_conf/conf.inc.php</td>\n</tr>\n<tr>\n<td>phpWebSite</td>\n<td>/conf/config.php</td>\n</tr>\n<tr>\n<td>PhpWiki</td>\n<td>/admin.php or /lib/config.php</td>\n</tr>\n<tr>\n<td>Pligg</td>\n<td>/libs/dbconnect.php</td>\n</tr>\n<tr>\n<td>Post-Nuke</td>\n<td>/config.php</td>\n</tr>\n<tr>\n<td>PrestaShop</td>\n<td>/config/settings.inc.php</td>\n</tr>\n<tr>\n<td>Saurus CMS</td>\n<td>/config.php</td>\n</tr>\n<tr>\n<td>ShopSite</td>\n<td>/includes/configure.php or /admin/includes/configure.php</td>\n</tr>\n<tr>\n<td>Siteframe</td>\n<td>/config.php</td>\n</tr>\n<tr>\n<td>Simple Machines Forum</td>\n<td>/Settings.php</td>\n</tr>\n<tr>\n<td>Soholaunch</td>\n<td>/sohoadmin/config/isp.conf.php</td>\n</tr>\n<tr>\n<td>SugarCRM</td>\n<td>/config.php</td>\n</tr>\n<tr>\n<td>Textpattern</td>\n<td>/textpattern/config.php</td>\n</tr>\n<tr>\n<td>TikiWiki</td>\n<td>/db/local.php</td>\n</tr>\n<tr>\n<td>Tomato Cart</td>\n<td>/includes/configure.php</td>\n</tr>\n<tr>\n<td>TYPO3</td>\n<td>/typo3conf/localconf.php</td>\n</tr>\n<tr>\n<td>WebCalendar</td>\n<td>/includes/settings.php</td>\n</tr>\n<tr>\n<td>WHMCS</td>\n<td>/configuration.php</td>\n</tr>\n<tr>\n<td>WordPress</td>\n<td>/wp-config.php</td>\n</tr>\n<tr>\n<td>X7 Chat</td>\n<td>/config.php</td>\n</tr>\n<tr>\n<td>Xoops</td>\n<td>/mainfile.php</td>\n</tr>\n<tr>\n<td>Zen Cart</td>\n<td>/includes/configure.php or /admin/includes/configure.php</td>\n</tr>\n<tr>\n<td>Zikula</td>\n<td>/config.php</td>\n</tr>\n</tbody>\n</table>\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 .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk3 { color: #6A9955; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n  .dark-default-dark .mtk7 { color: #B5CEA8; }\n  .dark-default-dark .mtk10 { color: #4EC9B0; }\n</style>","frontmatter":{"date":"October 26, 2015","updated_date":null,"description":null,"title":"How to Get Email Alerts for Unhandled PHP Exceptions","tags":["PHP","Email"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1,"src":"/static/4a396ee0a823348eb1c43701756c8981/7d145/email-alerts-unhandled-php.png","srcSet":"/static/4a396ee0a823348eb1c43701756c8981/69585/email-alerts-unhandled-php.png 200w,\n/static/4a396ee0a823348eb1c43701756c8981/497c6/email-alerts-unhandled-php.png 400w,\n/static/4a396ee0a823348eb1c43701756c8981/7d145/email-alerts-unhandled-php.png 610w","sizes":"(max-width: 610px) 100vw, 610px"}}},"author":{"id":"Team LoginRadius","github":"LoginRadius","avatar":null}}}},{"node":{"excerpt":"So last week while I was setting the analyzers on ElasticSearch settings for Email field, it took me some good time to find the perfect…","fields":{"slug":"/engineering/elastic-search-analyzers-for-emails/"},"html":"<p>So last week while I was setting the analyzers on ElasticSearch settings for Email field, it took me some good time to find the perfect custom analyzer for my purpose, so I feel it might be useful to share this with someone who needs it.</p>\n<blockquote>\n<p>When a document is indexed, its individual fields are subject to the analyzing and tokenizing filters that can transform and normalize the data in the fields. For example — removing blank spaces, removing html code, stemming, removing a particular character and replacing it with another. At indexing time as well as at query time you may need to do some of the above or similiar operations. For example, you might perform a Soundex transformation (a type of phonic hashing) on a string to enable a search based upon the word and upon its 'sound-alikes'.</p>\n</blockquote>\n<p>Let me briefly explain what I am trying to do with my Email field. The email addresses will be stored as a comma separated string with potentially multiple email addresses, and what I am expecting is after the to search to retrieve the matching results. Besides the exact match like search for <code>\"john.doe@gmail.com\"</code>, I also want to be able to search for <code>\"john.doe\"</code> or <code>\"gmail.com\"</code> to retrieve the relative information.</p>\n<p>Here is the full schema for it:</p>\n<ol>\n<li>{\"email\": \"john.doe@gmail.com\"}</li>\n<li>{\"email\": \"john.doe@gmail.com, john.doe@outlook.com\"}</li>\n<li>{\"email\": \"hello-john.doe@outlook.com\"}</li>\n<li>{\"email\": \"john.doe@outlook.com\"}</li>\n<li>{\"email\": \"john@yahoo.com\"}</li>\n</ol>\n<p>And the search schema is:<br>\n[Search > Response]<br>\n\"john.doe@gmail.com\" > 1,2<br>\n\"john.doe@outlook.com\" > 2,4<br>\n\"john@yahoo.com\" > 5<br>\n\"john.doe\" > 1,2,3,4<br>\n\"john\" > 1,2,3,4,5<br>\n\"gmail.com\" > 1,2<br>\n\"outlook.com\" > 2,3,4</p>\n<p>If you decide to keep reading, then it means you have the same needs as I did so I hope the following solution can actually help.<br>\nSo... In the official documentation they did have a good solution but it was not easy to find, at least for me, by using regular expression:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">{</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk8\">&quot;settings&quot;</span><span class=\"mtk1\"> : {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk8\">&quot;analysis&quot;</span><span class=\"mtk12\"> :</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">         </span><span class=\"mtk8\">&quot;filter&quot;</span><span class=\"mtk12\"> :</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">            </span><span class=\"mtk8\">&quot;email&quot;</span><span class=\"mtk12\"> :</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">               </span><span class=\"mtk8\">&quot;type&quot;</span><span class=\"mtk12\"> :</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&quot;pattern_capture&quot;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">               </span><span class=\"mtk8\">&quot;preserve_original&quot;</span><span class=\"mtk12\"> :</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 class=\"mtk8\">&quot;patterns&quot;</span><span class=\"mtk12\"> :</span><span class=\"mtk1\"> [</span></span>\n<span class=\"grvsc-line\"><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=\"mtk8\">&quot;(</span><span class=\"mtk6\">\\p</span><span class=\"mtk8\">{L}+)&quot;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                  </span><span class=\"mtk8\">&quot;(</span><span class=\"mtk6\">\\d</span><span class=\"mtk8\">+)&quot;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                  </span><span class=\"mtk8\">&quot;@(.+)&quot;</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=\"mtk1\">         },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">         </span><span class=\"mtk8\">&quot;analyzer&quot;</span><span class=\"mtk12\"> :</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">            </span><span class=\"mtk8\">&quot;email&quot;</span><span class=\"mtk12\"> :</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">               </span><span class=\"mtk8\">&quot;tokenizer&quot;</span><span class=\"mtk12\"> :</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&quot;uax_url_email&quot;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">               </span><span class=\"mtk8\">&quot;filter&quot;</span><span class=\"mtk12\"> :</span><span class=\"mtk1\"> [ </span><span class=\"mtk8\">&quot;email&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;lowercase&quot;</span><span class=\"mtk1\">,  </span><span class=\"mtk8\">&quot;unique&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>\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=\"mtk1\">}</span></span></code></pre>\n<p>This setting will perfectly address the issues from above, and do not generate way to much tokens in your ES cluster.<br>\nAt the end I want to share two good gadgets that I found very helpful with ES analyzers and regular expression.</p>\n<ol>\n<li><strong>Inquisitor:</strong><br>\nThis Elastic Search tool allows you to quickly apply different analyzers, tokenizers and filters to your input, fork it here:<br>\n<a href=\"https://github.com/polyfractal/elasticsearch-inquisitor\">Elasticsearch Inquisitor</a></li>\n<li><strong>regex 101:</strong>\nTo quickly test out your regular expression, try this link: <a href=\"https://regex101.com/\">regex101</a></li>\n</ol>\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 .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk7 { color: #B5CEA8; }\n  .dark-default-dark .mtk6 { color: #D7BA7D; }\n</style>","frontmatter":{"date":"October 15, 2015","updated_date":null,"description":null,"title":"ElasticSearch Analyzers for Emails","tags":["Elastic Search","Analyzers"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.9230769230769231,"src":"/static/db4c939fb2ba73abdc984760c0082348/ee604/elastic-search.png","srcSet":"/static/db4c939fb2ba73abdc984760c0082348/69585/elastic-search.png 200w,\n/static/db4c939fb2ba73abdc984760c0082348/497c6/elastic-search.png 400w,\n/static/db4c939fb2ba73abdc984760c0082348/ee604/elastic-search.png 800w,\n/static/db4c939fb2ba73abdc984760c0082348/f3583/elastic-search.png 1200w,\n/static/db4c939fb2ba73abdc984760c0082348/5707d/elastic-search.png 1600w,\n/static/db4c939fb2ba73abdc984760c0082348/a16c9/elastic-search.png 3422w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Lucius Yu","github":null,"avatar":null}}}},{"node":{"excerpt":"Integrating social into your site can drastically improve user engagement with your platform. Below are a few useful solutions and…","fields":{"slug":"/engineering/simple-social-media-solutions/"},"html":"<p>Integrating social into your site can drastically improve user engagement with your platform. Below are a few useful solutions and implementation instructions.</p>\n<h2 id=\"social-login\" style=\"position:relative;\"><a href=\"#social-login\" aria-label=\"social login 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>Social Login</h2>\n<p>Social Login, also known as Social Sign On, Allows you to bypass traditional registration forms and utilize the systems in place by social providers in order to retrieve a copy of the users data and a unique identifier for the user that can be used to identify that user in your system.</p>\n<p>The following guides go over setting up Social Login with a few common Social Providers:<br>\nFacebook: <a href=\"/implement-facebook-social-login/\">How to Implement Facebook Social Login</a><br>\nTwitter: <a href=\"/integrating-twitter-social-login/\">Integrating Twitter Social Login</a><br>\nLinkedIn: <a href=\"/integrate-linkedin-social-login-website/\">Integrating LinkedIn Social Login on a Website</a></p>\n<h2 id=\"social-sharing\" style=\"position:relative;\"><a href=\"#social-sharing\" aria-label=\"social sharing 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>Social Sharing</h2>\n<p>Most major social providers offer an easy tool to formulate and include sharing buttons on your pages. Below is an example of setting up an easy to use social sharing button with Facebook:</p>\n<ol>\n<li>Include the Facebook JavaScript SDK on your page:</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!----&gt;</span></span></code></pre>\n<ol start=\"6\">\n<li>\n<p>Next include the div that will contain the sharing button on your page with the following data attributes:</p>\n<ol>\n<li>data-href - Set this to the URL that you want to share.</li>\n<li>data-layout - Set this to one of the following to control the style of button that is displayed:<br>\na. box_count<br>\nb. button_count<br>\nc. button<br>\nd. icon_link<br>\ne. icon<br>\nf. link</li>\n</ol>\n</li>\n</ol>\n<p>Sample Div:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!-- --&gt;</span></span></code></pre>\n<p>You can find information on generating sharing links with other providers in the following locations:<br>\n<a href=\"https://about.twitter.com/resources/buttons\">Twitter</a>  </p>\n<p>Or you can contribute to our open source project on github- <a href=\"https://github.com/social9\">Github-Social9</a></p>\n<h2 id=\"follow-company\" style=\"position:relative;\"><a href=\"#follow-company\" aria-label=\"follow company 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>Follow Company</h2>\n<p>Follow buttons work very much the same as the social sharing buttons above. Simply include the relevant SDK and div with some customizations and users will be able to follow(and un-follow) your brand directly from your page.</p>\n<p>Below is an example of setting up a Twitter follow button:</p>\n<ol>\n<li>Include Twitters JavaScript SDK using their provided script:</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!----&gt;</span></span></code></pre>\n<ol start=\"6\">\n<li>Include a link tag in the location that you would like to display your follow button:</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!-- </span><span class=\"mtk12\">Follow</span><span class=\"mtk1\"> @</span><span class=\"mtk12\">TwitterDev</span><span class=\"mtk1\"> --&gt;</span></span></code></pre>\n<p>You can set the data attributes in the above link to control various aspects of the follow button.</p>\n<p>Find information on generating follow buttons for other social providers in the following locations:<br>\n<a href=\"https://developers.facebook.com/docs/archive/docs/plugins/follow-button/\">Facebook</a>  </p>\n<h2 id=\"social-linking\" style=\"position:relative;\"><a href=\"#social-linking\" aria-label=\"social linking 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>Social Linking</h2>\n<p>One of the most common and easy to configure social integrations is setting up links to your companies Social profiles.<br>\nAll you need to do is create a link tag on your page:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!--</span><span class=\"mtk12\">Facebook</span><span class=\"mtk1\">--&gt;</span></span></code></pre>\n<p>You can improve upon this by utilizing one of the Social providers branded icons to better display the linking UX. Get a copy of Facebooks Branded Icon.<br>\nYou can store the image locally and include it in the a tag:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"5\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!--&lt;</span><span class=\"mtk12\">img</span><span class=\"mtk1\"> </span><span class=\"mtk12\">src</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">alt</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;Facebook&quot;</span><span class=\"mtk1\">&gt; --&gt;</span></span></code></pre>\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>Now that you have setup the above social features your users will have a variety of touch-points to keep them active and interacting with your site, seamlessly driving user conversions and making brand ambassadors of your users.</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 .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n</style>","frontmatter":{"date":"October 08, 2015","updated_date":null,"description":null,"title":"Social Media Solutions","tags":["Social Media","Social Login"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.408450704225352,"src":"/static/b3a4226418ae955228bf1bc38289c30a/ee604/social-media.png","srcSet":"/static/b3a4226418ae955228bf1bc38289c30a/69585/social-media.png 200w,\n/static/b3a4226418ae955228bf1bc38289c30a/497c6/social-media.png 400w,\n/static/b3a4226418ae955228bf1bc38289c30a/ee604/social-media.png 800w,\n/static/b3a4226418ae955228bf1bc38289c30a/40ffe/social-media.png 960w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Karl Wittig","github":null,"avatar":null}}}},{"node":{"excerpt":"Introduction Authentication and authorization both are most important things for any system and application. This blog starts with…","fields":{"slug":"/engineering/alternate-authentication-asp/"},"html":"<p><strong>Introduction</strong></p>\n<p>Authentication and authorization both are most important things for any system and application. This blog starts with authentication and authorization concepts and after that explains the three default important ways and three custom authentication ways for doing authentication and authorization i.e. windows, forms ,passport, multipass, JWT  and SAML authentication. Plus, in this blog I will explain some fundamental concepts about the different authentication system.</p>\n<p><strong>Authentication and Authorization</strong></p>\n<p>Authentication is the process for checking the identity of a user based on the user’s credentials. Generally, user’s credentials are  in the form of user ID and password, and we check their credentials from database or equivalent alternative, if it exists then user is a valid candidate for next process - authorization.</p>\n<p>Authorization also known as “Permission Control” will come after authentication. Authorization is the process of deciding what kind of resource a user can access based on their identity and checking whether the authenticated user has sufficient rights to access the requested resources. Typically a resource can be an ASP.NET web page, media files (MP4, GIF, JPEG etc), compressed file (ZIP, RAR) etc.</p>\n<p><strong>ASP.NET default authentication Providers</strong></p>\n<p><strong>1. Form Authentication</strong></p>\n<p>Normally, form authentication is based on cookies, the authentication and permission settings are stored in cookies. However, we can also use form authentication without cookies, and in cookie-less form authentication we can use query string for passing user details. Remember, the key concept is always ONLY allow the user with correct credential also enough permission to view certain resources, so we need to capture their information and compare with what we have stored in the database. And no matter what kind of form authentication we use, after we receive the data on server end, we will compare them with the data stored in any storage method/provider. For example, we can store username and password in the web.config file, a JSON file, or a database table.</p>\n<p>Forms authentication flow:</p>\n<ol>\n<li>When a user requests a page for the application, ASP.NET checks session cookie. If the cookie exists and valid, ASP.NET assumes the user is authenticated and processes the request.</li>\n<li>If session cookies does not exists or not valid then it redirect to login form.</li>\n<li>User will enter username and password and if they are valid then he will get authenticated and authorized.</li>\n</ol>\n<p> <strong>2. Passport Authentication</strong></p>\n<p>Passport authentication is a centralized authentication service provided by Microsoft. The .NET Passport single sign-in service. When we use passport authentication then user authentication in your application is managed by Microsoft's passport service. Passport authentication uses encrypted cookies to manage the authentication.</p>\n<p><strong>How Password authentication works</strong> Users do not need to retype their sign-in name and password when moving from site to site. Those .NET Passport–enabled sites will issue a set of encrypted cookies in the .NET Passport central servers' domain to facilitate silent and seamless sign-in across sites. In some cases, sites owners will first redirect their end-users to .NET Passport sign-in and to authenticate upon first viewing of their site. If the users are logged in already, they'll get authenticated by ASP.NET, and if they are not logged in they will get redirected to passport servers (i.e hotmail, Live etc.)  to login first. If user successfully authenticates himself, it will return a token to your website.</p>\n<p><strong>3. Windows Authentication</strong></p>\n<p>We use windows authentication when we are creating a web application for a limited number of users who already have Windows account and this type of authentication is quite useful in an intranet environment. This authentication method uses local users windows account 'credentials' for to validate the user. Dot Net web application generally hosted on IIS(Internet Information Server) so the requests go directly to IIS to provide the authentication process in a Windows-based authentication model.</p>\n<p>The entire responsibility of authentication is done by IIS. It first takes the user’s credentials from the domain login. If this process fails, IIS displays an alert dialog box so the user can enter or re-enter his login information.</p>\n<p>Windows authentication have some advantages and disadvantages:</p>\n<p><strong>Windows authentication Advantage</strong></p>\n<ol>\n<li>Developers need to write less line of code for managing user's authentication.</li>\n<li>Users can use their existing windows accounts for login.</li>\n</ol>\n<p><strong>Windows authentication dis-Advantage</strong></p>\n<ol>\n<li>You can't control windows authentication process.</li>\n<li>Windows authentication only works on Microsoft OS you can't use it on others OS.</li>\n</ol>\n<p> <strong>4. Custom authentication Provider</strong></p>\n<ol>\n<li><strong>Multipass</strong></li>\n</ol>\n<p>Multipass authentication is a single sign on authentication. Suppose you have multiple sites and you want to create a single account for a user on both sites then you can use Single Sign-On. Single Sign-On is authentication system it allow user to share his authentication details with your there site. This allows a seamless experience for your users without forcing them to create a separate account on your second site. A multipass is simply a hash of keys and values, provided as an AES encrypted JSON hash.</p>\n<ol start=\"2\">\n<li><strong>JWT (JSON Web token)</strong></li>\n</ol>\n<p>JWTs represent a set of claims as a JSON object that is encoded in a JWS and/or JWE structure. This JSON object is called “JWT Claims Set”. The JSON object consists of zero or more name/value pairs (or members), where the names are strings and the values are arbitrary JSON values. These members are the claims represented by the JWT.</p>\n<p>Your JWTs can contain any information you want; the user's name, birthdate, email, etc. You do this with claims based authorization. You then just tell your provider to make a JWT with these claims from the claims principle.</p>\n<ol start=\"3\">\n<li><strong>SAML (Security Assertion Markup Language)</strong></li>\n</ol>\n<p>SAML - Security Assertion Markup Language SAML. SAML is developed by the Security Services Technical Committee of \"Organization for the Advancement of Structured Information Standards\" (OASIS). SAML is an XML-based framework for exchanging user authentication. The purpose of SAML is to enable Single Sign-On for web applications across various domains.</p>\n<p>SAML have three components: assertions, protocol, and binding. Assertions are authentication, attribute, and authorization. Authentication assertion validates the user's identity. Attribute assertion contains specific information about the user. And authorization assertion identifies user role and permissions.</p>\n<p>SAML works with multiple protocols including Hypertext Transfer Protocol (HTTP), Simple Mail Transfer Protocol (SMTP), File Transfer Protocol (FTP) and also supports SOAP</p>\n<p><strong>Summary</strong></p>\n<p>Different authentication methods are available, and website’s owner always gets confused about which authentication method they should use, here I have explained some of the popular authentication and authorization methods, hope it made it a little bit clear for you. And I will provide some in-depth details about each type of authentication in my next blog, <strong>happy coding</strong>.</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":"October 01, 2015","updated_date":null,"description":"Learn types of Authentication in Asp.Net and how it plays an important role in any system.","title":"Types of Authentication in Asp.Net","tags":["Engineering","Authentication","Asp.Net","Multipass","JWT","JSON Web Token"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1,"src":"/static/09593e63090dd5b6ec6f5258209a953b/6d161/alternate-authentication-asp-dot-net1-150x150.png","srcSet":"/static/09593e63090dd5b6ec6f5258209a953b/6d161/alternate-authentication-asp-dot-net1-150x150.png 150w","sizes":"(max-width: 150px) 100vw, 150px"}}},"author":{"id":"Team LoginRadius","github":"LoginRadius","avatar":null}}}},{"node":{"excerpt":"Facebooks Graph API gives you the ability to better understand and target content to your user. In this blog we go over some useful…","fields":{"slug":"/engineering/using-facebook-graph-api-after-login/"},"html":"<p>Facebooks Graph API gives you the ability to better understand and target content to your user. In this blog we go over some useful implementations of the Graph API that you can use to pull in user data as well as publish on your users behalf.</p>\n<h2 id=\"getting-your-site-ready\" style=\"position:relative;\"><a href=\"#getting-your-site-ready\" aria-label=\"getting your site ready 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>Getting Your Site Ready</h2>\n<p>The first thing you will need to do is implement an authorization interface that will allow your users to Login with there Facebook credentials and grant access to your application to handle the features that we will go over in this blog.</p>\n<p>You can refer to this article on setting up a Facebook Login integration: <a href=\"https://www.loginradius.com/blog/engineering/implement-facebook-social-login/\">Implement Facebook Social Login</a></p>\n<p>While implementing the Login detailed in the above blog you can modify the scope included in the Facebook button to request the scopes that we will be using.</p>\n<p>Define your Facebook button as follows:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!-- --&gt;</span></span></code></pre>\n<p>This will cause your interface to request additional permissions that may require you to submit your app for review in order for your users to get access to these permissions.</p>\n<h2 id=\"managing-your-users-login-credentials\" style=\"position:relative;\"><a href=\"#managing-your-users-login-credentials\" aria-label=\"managing your users login credentials 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>Managing your users login credentials.</h2>\n<p>After your user has authenticated you can capture the users access token for use in your application or backend systems. During the Facebook login in the function function statusChangeCallback you can check the response for an active Facebook session and store the access token from this object as follows:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">response</span><span class=\"mtk1\">.</span><span class=\"mtk12\">authResponse</span><span class=\"mtk1\">) { </span><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">access_token</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">FB</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getAuthResponse</span><span class=\"mtk1\">()[</span><span class=\"mtk8\">&#39;accessToken&#39;</span><span class=\"mtk1\">]; }</span></span></code></pre>\n<p>This token is valid for 2 hours by default and can be upgraded to a long lived with a server-side call as detailed here: <a href=\"https://developers.facebook.com/docs/facebook-login/access-tokens#extending\">Access Tokens for Meta Technologies</a></p>\n<p>The long lived token will be valid for 60 days over which you will be able to access the users data or handle actions that they have granted your app permissions.</p>\n<p>If you have stored an access token or long lived token and wish to reinitialize the Facebook JavaScript graph API you can handle this by including the following parameter when making FB.api calls:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk12\">FB</span><span class=\"mtk1\">.</span><span class=\"mtk11\">api</span><span class=\"mtk1\">( </span><span class=\"mtk8\">&#39;/me&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&#39;get&#39;</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">access_token :</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;access_token_for_some_user_fetched_from_your_database&#39;</span><span class=\"mtk1\"> } );</span></span></code></pre>\n<h2 id=\"\" style=\"position:relative;\"><a href=\"#\" aria-label=\" 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></h2>\n<p>Getting User Data and Specific Fields</p>\n<p>The simplest way to get a copy of the User Profile object is to access the /me endpoint:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk12\">FB</span><span class=\"mtk1\">.</span><span class=\"mtk11\">api</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;/me&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk4\">function</span><span class=\"mtk1\">(</span><span class=\"mtk12\">response</span><span class=\"mtk1\">) { });</span></span></code></pre>\n<p>This will this will return the users name and an ID by default. You can add additional field requests to the me endpoint in order to retrieve further data-points for the user. Below we request the users id, name, age_range, bio, birthday, and email using a stored access-token.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!--</span><span class=\"mtk12\">FB</span><span class=\"mtk1\">.</span><span class=\"mtk11\">api</span><span class=\"mtk1\">( </span><span class=\"mtk8\">&#39;/me?fields=id,name,about,age_range,bio,birthday,email&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&#39;get&#39;</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">access_token :</span><span class=\"mtk1\">  },</span><span class=\"mtk4\">function</span><span class=\"mtk1\">(</span><span class=\"mtk12\">response</span><span class=\"mtk1\">) { </span><span class=\"mtk3\">//Handle Data Here it will arrive in a Json object in the response } );--&gt;</span></span></code></pre>\n<p>There are additional edge cases which can be accessed through the /me endpoint. A full list can be found <a href=\"https://developers.facebook.com/docs/graph-api/reference/user\">here</a>. A below sample details how you can retrieve the videos that the user is tagged in or has uploaded.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"5\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!--</span><span class=\"mtk12\">FB</span><span class=\"mtk1\">.</span><span class=\"mtk11\">api</span><span class=\"mtk1\">( </span><span class=\"mtk8\">&#39;/me/videos&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&#39;get&#39;</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">access_token :</span><span class=\"mtk1\">  },</span><span class=\"mtk4\">function</span><span class=\"mtk1\">(</span><span class=\"mtk12\">response</span><span class=\"mtk1\">) { </span><span class=\"mtk3\">//Handle Data Here it will arrive in a Json object in the response } );--&gt;</span></span></code></pre>\n<h2 id=\"-1\" style=\"position:relative;\"><a href=\"#-1\" aria-label=\" 1 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></h2>\n<p>Publishing Content to a Users Wall</p>\n<p>In order to publish content to a users wall you will have to have requested the publish_actions permission during login which we have done in the first part of this article. You can then access the following endpoint to publish a status post to a users wall:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"6\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;!--</span><span class=\"mtk12\">FB</span><span class=\"mtk1\">.</span><span class=\"mtk11\">api</span><span class=\"mtk1\">( </span><span class=\"mtk8\">&#39;/me/feed?message=&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&#39;Post&#39;</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">access_token :</span><span class=\"mtk1\">  },</span><span class=\"mtk4\">function</span><span class=\"mtk1\">(</span><span class=\"mtk12\">response</span><span class=\"mtk1\">) { </span><span class=\"mtk3\">//Handle Response which will contain a Post ID if successful } );--&gt;</span></span></code></pre>\n<h2 id=\"-2\" style=\"position:relative;\"><a href=\"#-2\" aria-label=\" 2 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></h2>\n<p>Conclusion</p>\n<p>Facebook offers many options to integrate their API into your site and offers a variety of easy to use SDKs for multiple languages. Check out <a href=\"https://developers.facebook.com/docs\">their documentation</a> for details on the various SDKs and additional graph endpoints.</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 .mtk15 { color: #C586C0; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk3 { color: #6A9955; }\n</style>","frontmatter":{"date":"September 29, 2015","updated_date":null,"description":null,"title":"Using Facebook Graph API After Login","tags":["Facebook","Graph API"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1,"src":"/static/eb14899edcba74a8eeaae71d14ebf399/6d161/fb-feat-img-150x150.png","srcSet":"/static/eb14899edcba74a8eeaae71d14ebf399/6d161/fb-feat-img-150x150.png 150w","sizes":"(max-width: 150px) 100vw, 150px"}}},"author":{"id":"Karl Wittig","github":null,"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.jpg"}}}},"pageContext":{"limit":6,"skip":924,"currentPage":155,"type":"///","numPages":161,"pinned":"ee8a4479-3471-53b1-bf62-d0d8dc3faaeb"}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}