{"componentChunkName":"component---src-templates-blog-list-template-js","path":"/engineering/12","result":{"data":{"allMarkdownRemark":{"edges":[{"node":{"excerpt":"In this article, We will discuss the manipulation of DOM elements with Ref directly with React.  React Framework builds your components and…","fields":{"slug":"/engineering/react-with-refs/"},"html":"<p>In this article, We will discuss the manipulation of DOM elements with Ref directly with React. </p>\n<p>React Framework builds your components and abstracts your code away from manipulation within the DOM but still leaves the door open for developers to access it. Reason are few cases where it might be necessary. That's why React provides an escape hatch know as <code>refs</code>.</p>\n<p>Refs are a function that use to access the DOM from components. You only need to attach a <code>ref</code> to the element in your application to provide access to it from anywhere within your component without making use of props and all. </p>\n<p>We can also use Refs to direct access to React elements and use callbacks with them.</p>\n<p>We should only use <code>refs</code> when the required interaction cannot be achieved using state and props.</p>\n<h2 id=\"use-refs\" style=\"position:relative;\"><a href=\"#use-refs\" aria-label=\"use refs 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>Use Refs</h2>\n<p>We can use <code>refs</code> to do anything that needs to be manipulated in the DOM. Some good cases like focus, test selection, media playback, triggering mandatory animations, or integration with the third-party DOM library.</p>\n<p>Note: We should avoid using refs because it removes the purpose of using React.   For example, If you want to show and hide a \t<code>popup</code> component. We should use a boolean prop for it instead of manipulating dom.\n</p>\n<h3 id=\"creating-refs\" style=\"position:relative;\"><a href=\"#creating-refs\" aria-label=\"creating refs 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>Creating Refs</h3>\n<p>We can use <code>React.createRef()</code>method to create Refs, and then we can attach to a Dom element via the <code>ref</code> attribute after that, we can access and modify that element through the ref. </p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"javascript\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">class</span><span class=\"mtk1\"> </span><span class=\"mtk10\">App</span><span class=\"mtk1\"> </span><span class=\"mtk4\">extends</span><span class=\"mtk1\"> </span><span class=\"mtk10\">React</span><span class=\"mtk1\">.</span><span class=\"mtk10\">Component</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">constructor</span><span class=\"mtk1\">(</span><span class=\"mtk12\">props</span><span class=\"mtk1\">) {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk4\">super</span><span class=\"mtk1\">(</span><span class=\"mtk12\">props</span><span class=\"mtk1\">);  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">myRef</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">React</span><span class=\"mtk1\">.</span><span class=\"mtk11\">createRef</span><span class=\"mtk1\">();</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">render</span><span class=\"mtk1\">() {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk1\"> </span><span class=\"mtk12\">ref</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">myRef</span><span class=\"mtk4\">}</span><span class=\"mtk1\"> </span><span class=\"mtk17\">/&gt;</span><span class=\"mtk1\">; </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<p>In above code, We created <code>this.myRef</code> in the constructor by calling <code>React.createRef()</code>  method.</p>\n<p>Then in the <code>render</code> method , we attached the returned value to ref of the div element,  a reference to the node becomes accessible at the <code>current</code> attribute of the ref.</p>\n<p>We should not use <code>ref</code> attribute on function components because they do not have instances.</p>\n<p>React will assign the <code>current</code> property with Dom element when component mount and assign null to it when component unmount.  </p>\n<p><code>ref</code> updates happen before <code>componentDidMount</code> or <code>componentDidUpdate</code> methods.</p>\n<p>We can pass refs as props to the component. Example:</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=\"mtk4\">function</span><span class=\"mtk1\"> </span><span class=\"mtk11\">MyCustomTextInput</span><span class=\"mtk1\"> ({ </span><span class=\"mtk12\">myInputRef</span><span class=\"mtk1\"> }) {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">input</span><span class=\"mtk1\"> </span><span class=\"mtk12\">ref</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{</span><span class=\"mtk12\">myInputRef</span><span class=\"mtk4\">}</span><span class=\"mtk1\"> </span><span class=\"mtk17\">/&gt;</span><span class=\"mtk1\">;  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">class</span><span class=\"mtk1\"> </span><span class=\"mtk10\">App</span><span class=\"mtk1\"> </span><span class=\"mtk4\">extends</span><span class=\"mtk1\"> </span><span class=\"mtk10\">React</span><span class=\"mtk1\">.</span><span class=\"mtk10\">Component</span><span class=\"mtk1\"> {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">constructor</span><span class=\"mtk1\">(</span><span class=\"mtk12\">props</span><span class=\"mtk1\">) {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk4\">super</span><span class=\"mtk1\">(</span><span class=\"mtk12\">props</span><span class=\"mtk1\">);  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">myInputRef</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">React</span><span class=\"mtk1\">.</span><span class=\"mtk11\">createRef</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=\"mtk11\">componentDidMount</span><span class=\"mtk1\">() {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">myInputRef</span><span class=\"mtk1\">.</span><span class=\"mtk12\">current</span><span class=\"mtk1\">.</span><span class=\"mtk11\">focus</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=\"mtk11\">render</span><span class=\"mtk1\">() {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk17\">&lt;</span><span class=\"mtk10\">MyCustomTextInput</span><span class=\"mtk1\"> </span><span class=\"mtk12\">inputRef</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">myInputRef</span><span class=\"mtk4\">}</span><span class=\"mtk1\"> </span><span class=\"mtk17\">/&gt;</span><span class=\"mtk1\">;  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<p>In above code, <code>App</code> passed its ref as props to <code>MyCustomTextInput</code> component.</p>\n<h3 id=\"callback-refs\" style=\"position:relative;\"><a href=\"#callback-refs\" aria-label=\"callback refs 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>Callback Refs</h3>\n<p>We can create ref using another way called <code>callback refs</code>; it gives us more fine-grain control over when refs are set and unset within the component.</p>\n<p>Instead of passing <code>ref</code> returned by <code>createRef()</code> method, we will pass a function to <code>ref</code> attribute.\nThe function receives React component instance or DOM element, which can be stored and accessed anywhere.</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=\"mtk4\">class</span><span class=\"mtk1\"> </span><span class=\"mtk10\">App</span><span class=\"mtk1\"> </span><span class=\"mtk4\">extends</span><span class=\"mtk1\"> </span><span class=\"mtk10\">React</span><span class=\"mtk1\">.</span><span class=\"mtk10\">Component</span><span class=\"mtk1\"> {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">componentDidMount</span><span class=\"mtk1\">() {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">input</span><span class=\"mtk1\">.</span><span class=\"mtk11\">focus</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=\"mtk11\">render</span><span class=\"mtk1\">() {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> (    </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">input</span><span class=\"mtk1\"> </span><span class=\"mtk12\">ref</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{</span><span class=\"mtk12\">element</span><span class=\"mtk1\"> </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> (</span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">input</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">element</span><span class=\"mtk1\">)</span><span class=\"mtk4\">}</span><span class=\"mtk1\"> </span><span class=\"mtk17\">/&gt;</span><span class=\"mtk1\">;   </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    );  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<p>In the above code, React will call the ref callback t store the reference of the input element when the component mounts; then, it will focus the input element automatically and when the component unmounts, call it with null.</p>\n<p>We can pass callback refs between components . Example:</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=\"mtk4\">function</span><span class=\"mtk1\"> </span><span class=\"mtk11\">MyCustomTextInput</span><span class=\"mtk1\">({ </span><span class=\"mtk12\">inputRef</span><span class=\"mtk1\"> }) {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">input</span><span class=\"mtk1\"> </span><span class=\"mtk12\">ref</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{</span><span class=\"mtk12\">inputRef</span><span class=\"mtk4\">}</span><span class=\"mtk1\"> </span><span class=\"mtk17\">/&gt;</span><span class=\"mtk1\">;  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">class</span><span class=\"mtk1\"> </span><span class=\"mtk10\">App</span><span class=\"mtk1\"> </span><span class=\"mtk4\">extends</span><span class=\"mtk1\"> </span><span class=\"mtk10\">React</span><span class=\"mtk1\">.</span><span class=\"mtk10\">Component</span><span class=\"mtk1\"> {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">componentDidMount</span><span class=\"mtk1\">() {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">myInputElement</span><span class=\"mtk1\">.</span><span class=\"mtk11\">focus</span><span class=\"mtk1\">();  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  } </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">render</span><span class=\"mtk1\">() {  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk17\">&lt;</span><span class=\"mtk10\">MyCustomTextInput</span><span class=\"mtk1\"> </span><span class=\"mtk12\">inputRef</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{</span><span class=\"mtk12\">el</span><span class=\"mtk1\"> </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> (</span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">myInputElement</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">el</span><span class=\"mtk1\">)</span><span class=\"mtk4\">}</span><span class=\"mtk1\"> </span><span class=\"mtk17\">/&gt;</span><span class=\"mtk1\">;  </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  } </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<p>In the above code, We passed the function to <code>inputRef</code> and access it in <code>App</code> component so we can call <code>focus</code> on it to focus the input element.</p>\n<h3 id=\"caveats-with-callback-refs\" style=\"position:relative;\"><a href=\"#caveats-with-callback-refs\" aria-label=\"caveats with callback refs 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>Caveats with callback refs</h3>\n<p>Callback refs are calling two times during updates if they are defined as an inline function. This is because a new instance of the function is created with each render. We can avoid this by calling it a method of a class.</p>\n<p>To understand more about React refs. Read <a href=\"https://reactjs.org/docs/refs-and-the-dom.html\">Refs and the DOM</a></p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk10 { color: #4EC9B0; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n  .dark-default-dark .mtk17 { color: #808080; }\n</style>","frontmatter":{"date":"April 16, 2021","updated_date":null,"description":"Learn about manipulation of DOM elements with Ref directly with React","title":"React with Ref","tags":["React","Refs","DOM"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/0e4deace8ac6b8fceb2ca7ce559fc393/ee604/title-image.png","srcSet":"/static/0e4deace8ac6b8fceb2ca7ce559fc393/69585/title-image.png 200w,\n/static/0e4deace8ac6b8fceb2ca7ce559fc393/497c6/title-image.png 400w,\n/static/0e4deace8ac6b8fceb2ca7ce559fc393/ee604/title-image.png 800w,\n/static/0e4deace8ac6b8fceb2ca7ce559fc393/f3583/title-image.png 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Versha Gupta","github":"vershagupta","avatar":null}}}},{"node":{"excerpt":"Hello Guys!!!, today we will be implemented the authentication in the Angular 2+ application within 5 mins using LoginRadius. Configuring…","fields":{"slug":"/engineering/implementing-authentication-in-angular-2-plus-with-loginradius-cli/"},"html":"<p>Hello Guys!!!, today we will be implemented the authentication in the Angular 2+ application within 5 mins using <a href=\"https://accounts.loginradius.com/auth.aspx?return_url=https://dashboard.loginradius.com/login\">LoginRadius</a>.</p>\n<h2 id=\"configuring-loginradius\" style=\"position:relative;\"><a href=\"#configuring-loginradius\" aria-label=\"configuring loginradius 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>Configuring LoginRadius</h2>\n<p>To implement authentication in the angular app first let's start with registering in the Loginradius and creating the application using <a href=\"https://github.com/LoginRadius/lr-cli\">LoginRadius CLI</a>.</p>\n<h3 id=\"why-loginradius-cli\" style=\"position:relative;\"><a href=\"#why-loginradius-cli\" aria-label=\"why loginradius cli 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>Why LoginRadius CLI</h3>\n<p>Developer Experience plays a crucial role for us. We always think about the ways we can minimize the juggling between a quickstart tutorial, dashboard, and terminal. The LoginRadius CLI will simplify your flow by just using some simple commands to register, create an application, log in, etc., and enables you to get the job done in very little time without leaving the terminal.</p>\n<h3 id=\"loginradius-cli-setup\" style=\"position:relative;\"><a href=\"#loginradius-cli-setup\" aria-label=\"loginradius cli setup 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>LoginRadius CLI Setup</h3>\n<h4 id=\"mac-or-linux\" style=\"position:relative;\"><a href=\"#mac-or-linux\" aria-label=\"mac or linux 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>Mac or Linux</h4>\n<ul>\n<li>\n<p>Install the tap via:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"sh\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ brew tap loginradius/tap</span></span></code></pre>\n</li>\n<li>\n<p>Then, you can install LR CLI via:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"sh\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ brew install lr</span></span></code></pre>\n</li>\n</ul>\n<h4 id=\"other-platforms\" style=\"position:relative;\"><a href=\"#other-platforms\" aria-label=\"other platforms 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>Other Platforms</h4>\n<ul>\n<li>Download packaged binaries from the <a href=\"https://github.com/loginradius/lr-cli/releases/latest\">release page</a>.</li>\n</ul>\n<p>After installing the CLI, you can register into the LoginRadius via the below command.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"sh\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ lr register</span></span></code></pre>\n<p>This command will open the Loginradius in the browser to register yourself and create the app.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 60.92307692307693%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAABYlAAAWJQFJUiTwAAACC0lEQVQoz5WSW3PSUBRGU6fVUq3UC7XaqSjXpNxSLJdgCgFpba2X6tjfruNTI0P70IEmBEwQyOc+J8BAeTIz3+zkkLOy9uYIudwbKOUaKlodZUpa3kc0nkBMTFISSKZkpDNZXkUpuRBpN4WMTAxFRS6vQPCLKu6HC3gQLcIfL8EvvsWGpNKzghd7dfz4+QvNZhO6/hsXF/o0uk5V92qj0cDl5RWvwqpUxZZyBr98jDsxDcuvi1gJl7D0qoDA3hFsp4//uYSHyRoi2jmi2ncE1W94WfyIncIpnmTq2CSgYVr8xeFwCNPqon1jwrYdvua6Ls9oNJpG8Cc0hNQviJS/Ikw1pJ5hM3uEtfgBBzLIZHPLMHF13UK7Y8H+O8BgQKEPeb977wjruxVs50/J7BMep9/BF1NxL1Lird8Gts0umtc3ZN2BSVDDNGF1e3O2go9MtvaPeatPqU1mxrISUuaAI0+B3zuOjX7fm61LbbrjdQ8YO0BQ+Qyxes7nxuyY5XJo0XA43mx2OuiSGV+jlueAzOZ57oQbbuc/YCNZBRvDXQIHbgEng+/ZffT+2NPnOeC6VKGNh2B/zqNUjYfNkoGfZd/PAXnrBHDoKLHjxO5n58ePDQMyM9YuqwzGoDsFz9joWDObFs+dO7M4nqFKdlXPjLJGH/BJGpaCeQTkwwXDic1kBOwyDAOtVovf/wOvtKhoUmY20gAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Register Page\"\n        title=\"Register Page\"\n        src=\"/static/f7b929e780c62f831dea548530d792e3/e5715/resgister_page.png\"\n        srcset=\"/static/f7b929e780c62f831dea548530d792e3/a6d36/resgister_page.png 650w,\n/static/f7b929e780c62f831dea548530d792e3/e5715/resgister_page.png 768w,\n/static/f7b929e780c62f831dea548530d792e3/d9ed5/resgister_page.png 2880w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Once you successfully register you will be able to see the below message on the browser, you can close the tab and come back to the CLI.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">You are Successfully Authenticated, Kindly Close this browser window and go back to CLI.</span></code></pre>\n<h3 id=\"get-your-application-api-credentials\" style=\"position:relative;\"><a href=\"#get-your-application-api-credentials\" aria-label=\"get your application api 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>Get Your Application API Credentials</h3>\n<p>Once you <strong>login/register</strong> using the CLI, You can now run the <code>lr get config</code> command to get your API credentials. </p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 40%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAABYlAAAWJQFJUiTwAAABXElEQVQoz53RzU6DQBAH8Nldln7AQoECBSytHH0SD8Z69QX06NdRjc9h4tFEX8hUW6LWlgVLfAeHBpPG9NTDLzPZ2fknmwUAiAkhh5TSEfZHWxjVDlAIGHbSarU+hBBjxtgrHq4bm6Y5CYIg9Txvqmna27/56g56QRN0jOAKvdfD6X+KoqRcVVOF8xRfkW66s7Z7WgVeswbLFE2dNTqtBReNRds1MqrSBc6+1sw3+Jt9ohk6qwJvhRV+u70k88OksL24cPpJ4WDVhZvrvU7O/SgnwpZWsylF1M3bjpG3vU5uh26hMTWrw6rgiyrwRtcj6ZjDedeIpaFHma4HmeMMpIU6cVeq/USy4V6u2n7m2pa0dwNp7LjSGvjSilHozgVvVoHnVeAdAPnBz8kJoUvsS+wRXQECCCtXS6CsJABLqmClpISq56xkXCkoENyFS6i//gE9ouctPNW792j/F0p7gNt6dwoRAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"LoginRadius CLI Get Config\"\n        title=\"LoginRadius CLI Get Config\"\n        src=\"/static/a473438676d4734d4d95e8b084db1f16/e5715/lr_get_config.png\"\n        srcset=\"/static/a473438676d4734d4d95e8b084db1f16/a6d36/lr_get_config.png 650w,\n/static/a473438676d4734d4d95e8b084db1f16/e5715/lr_get_config.png 768w,\n/static/a473438676d4734d4d95e8b084db1f16/dd104/lr_get_config.png 1064w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h3 id=\"configuring-callback-urls\" style=\"position:relative;\"><a href=\"#configuring-callback-urls\" aria-label=\"configuring callback urls 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>Configuring Callback URLs</h3>\n<p>A callback URL is a URL in your application where LoginRadius redirects the user after they have authenticated. The callback URL for your app must be added to your Application Configuration. If this field is not set, users will be unable to log in to the application and get an error.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 49.69230769230769%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAABYlAAAWJQFJUiTwAAABR0lEQVQoz62S23KCMBCGef/H6sFqKVwiAiYBZMLBKiDi2b/ZbR31qnWmO/Oxm+zkzy5Za7fboWlatG2LruvY13Vt9hpQ7ng8/onD4cBYdKjIC8zncyyXtfGfmM1mzGazwSPGgvTReQ6lFGIVI0lSLBYLhi4jO5/Pd/7ObvZYcL/fI0lTBEGAMAgRhiHKskJVVVwhiVzaOp1Ov7ZtUdC2DbeYGuE4jploOoWUEuPxmC9TUsH3fc4J8Z2TQnIRQgh0qxWLWnRrURRwHAe2bWM0smG/O3A+XDw/veLF4JrYdVwMBm/cQa419A+5zvl83/dXwbIsMRyODEMEkxDK1xBexkhPQ4kEE1MlVRVFETzP46qCYGIIkcQJ/x4WpL5pRLIs40ehken7NdbrznDrr1A1t2satztBek16HIq32y0nH+Vy3roM5H/xBU+R+aSCVKLIAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Whitelist domain error\"\n        title=\"Whitelist domain error\"\n        src=\"/static/d1d9601855b3d84f38f961c307c7958b/e5715/whitelist_domain_error.png\"\n        srcset=\"/static/d1d9601855b3d84f38f961c307c7958b/a6d36/whitelist_domain_error.png 650w,\n/static/d1d9601855b3d84f38f961c307c7958b/e5715/whitelist_domain_error.png 768w,\n/static/d1d9601855b3d84f38f961c307c7958b/00172/whitelist_domain_error.png 1044w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>To get the list of whitelisted domains, you can run <code>lr get domain</code> command from the cmd prompt. And to add a domain in the list using <code>lr add domain</code> command. </p>\n<blockquote>\n<p>If you are following this tutorial, you should set the  <code>http://localhost</code> as a whitelisted domain. Check the below image for how to add the domain using LoginRadius CLI.</p>\n</blockquote>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 45.230769230769226%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAABYlAAAWJQFJUiTwAAABWElEQVQoz53RzU7CQBAH8G1pAt1+7G4XSlkggBAS44PwDqAXvXtEnsI7B9/LQAXB7m6rL+G0WY0hHtDDL5NOd/6dtgghNLJte16r1RaWZV3D9c0flTMLMC+zEITcua57CIJg4zjOFpoby0KbspYIIS9CiF2r1drBmfSrf+IZ7MEtQPcgNc3tKdg8hQdV4E22v50xs6nJQst63c6w5xwi1pCM1mVX+ApjJ4N7b2fam7osA1dJSPQkbsu4Geq4RfJOQnJKPe37nobPUVKEBhp7rg5DX9u2JWEu++Fg6qoK5ATrXptkgz7NhwOaT8e84AzrbjvMry7jYthj+SQWhWA8Z4zkTU4rGDcUzMvTwIcmd6UQ/nE6Znp8QXU/pmoUxYoFnkwSpjtJpFkQKOJ7EjZUUUQU51QxFlbgx75CzvF7Q/ABNCjAe8ky9UzaZFSBM/AI1uDpn9YmY/YJItCUJ5C8j5gAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"LoginRadius CLI Add Domain\"\n        title=\"LoginRadius CLI Add Domain\"\n        src=\"/static/8473d7ec2aa6a7836c5d621070194fc5/e5715/lr_add_domain.png\"\n        srcset=\"/static/8473d7ec2aa6a7836c5d621070194fc5/a6d36/lr_add_domain.png 650w,\n/static/8473d7ec2aa6a7836c5d621070194fc5/e5715/lr_add_domain.png 768w,\n/static/8473d7ec2aa6a7836c5d621070194fc5/1ff84/lr_add_domain.png 1040w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h3 id=\"setup-angular-application\" style=\"position:relative;\"><a href=\"#setup-angular-application\" aria-label=\"setup angular application permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Setup Angular application</h3>\n<p>You can implement the LoginRadius authentication in your existing Angular application, or you can start from scratch by following <a href=\"https://angular.io/guide/setup-local\">this tutorial</a>.</p>\n<blockquote>\n<p>You need to enable the routing for this tutorial if you are not aware of how to enable routing in the angular application, kindly follow <a href=\"https://angular.io/guide/router\">this tutorial</a></p>\n</blockquote>\n<ul>\n<li>\n<p>Create <code>src/app/config.ts</code> and add the below application configuration</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"ts\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">config</span><span class=\"mtk1\"> = {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">APP_NAME:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;&lt;&lt;Your App Name&gt;&gt;&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">API_KEY:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;&lt;&lt;Your API Key&gt;&gt;&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">};</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk15\">default</span><span class=\"mtk1\"> </span><span class=\"mtk12\">config</span><span class=\"mtk1\">;</span></span></code></pre>\n</li>\n</ul>\n<h3 id=\"add-login-to-your-application\" style=\"position:relative;\"><a href=\"#add-login-to-your-application\" aria-label=\"add login to your application permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add Login to Your Application</h3>\n<p>If you have already created the login component, add the following code in the <code>.ts</code> file else, generate the login component using ng CLI <code>ng generate component login</code>. Which will create a component inside the <code>app</code> folder. Add the following code to the <code>login.component.ts</code></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"ts\" data-index=\"5\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">Component</span><span class=\"mtk1\">, </span><span class=\"mtk12\">OnInit</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;@angular/core&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">ActivatedRoute</span><span class=\"mtk1\">, </span><span class=\"mtk12\">Router</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;@angular/router&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">config</span><span class=\"mtk1\"> </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;../config&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">@</span><span class=\"mtk11\">Component</span><span class=\"mtk1\">({</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">selector:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;app-login&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">templateUrl:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;./login.component.html&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">styleUrls:</span><span class=\"mtk1\"> [</span><span class=\"mtk8\">&#39;./login.component.scss&#39;</span><span class=\"mtk1\">],</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk4\">class</span><span class=\"mtk1\"> </span><span class=\"mtk10\">LoginComponent</span><span class=\"mtk1\"> </span><span class=\"mtk4\">implements</span><span class=\"mtk1\"> </span><span class=\"mtk10\">OnInit</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">constructor</span><span class=\"mtk1\">(</span><span class=\"mtk4\">private</span><span class=\"mtk1\"> </span><span class=\"mtk12\">route</span><span class=\"mtk1\">: </span><span class=\"mtk10\">ActivatedRoute</span><span class=\"mtk1\">, </span><span class=\"mtk4\">private</span><span class=\"mtk1\"> </span><span class=\"mtk12\">router</span><span class=\"mtk1\">: </span><span class=\"mtk10\">Router</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">route</span><span class=\"mtk1\">.</span><span class=\"mtk12\">queryParams</span><span class=\"mtk1\">.</span><span class=\"mtk11\">subscribe</span><span class=\"mtk1\">((</span><span class=\"mtk12\">params</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">params</span><span class=\"mtk1\">.</span><span class=\"mtk12\">token</span><span class=\"mtk1\"> || </span><span class=\"mtk12\">localStorage</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getItem</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;token&#39;</span><span class=\"mtk1\">)) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk12\">localStorage</span><span class=\"mtk1\">.</span><span class=\"mtk11\">setItem</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;token&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">params</span><span class=\"mtk1\">.</span><span class=\"mtk12\">token</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">router</span><span class=\"mtk1\">.</span><span class=\"mtk11\">navigate</span><span class=\"mtk1\">([</span><span class=\"mtk8\">&#39;/profile&#39;</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\">window</span><span class=\"mtk1\">.</span><span class=\"mtk12\">location</span><span class=\"mtk1\">.</span><span class=\"mtk12\">href</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">`https://</span><span class=\"mtk4\">${</span><span class=\"mtk12\">config</span><span class=\"mtk1\">.</span><span class=\"mtk12\">APP_NAME</span><span class=\"mtk4\">}</span><span class=\"mtk8\">.hub.loginradius.com/auth.aspx?return_url=</span><span class=\"mtk4\">${</span><span class=\"mtk12\">window</span><span class=\"mtk1\">.</span><span class=\"mtk12\">location</span><span class=\"mtk1\">.</span><span class=\"mtk12\">origin</span><span class=\"mtk4\">}</span><span class=\"mtk8\">/login`</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>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">ngOnInit</span><span class=\"mtk1\">(): </span><span class=\"mtk10\">void</span><span class=\"mtk1\"> {}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<p>Here we are redirecting the application to the <strong>LoginRadius Auth Page</strong> where we are passing the <code>return_url</code> as the current origin, so after successful login, the <strong>LoginRadius Auth Page</strong> will redirect to the angular application with <code>token</code> as a query param. Later we will use <code>token</code> for all the user-related actions.</p>\n<h3 id=\"add-profile-page\" style=\"position:relative;\"><a href=\"#add-profile-page\" aria-label=\"add profile page 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>Add Profile Page</h3>\n<p>As you have seen in the above code on successful login, we redirect to <code>/profile</code> page. So let us create a <strong>profile</strong> component using <code>ng</code> CLI <code>ng generate component profile</code>.\nAnd let's modify the <code>profile.component.ts</code> file in the <code>app/profile</code> folder generated by ng CLI.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"ts\" data-index=\"6\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">Component</span><span class=\"mtk1\">, </span><span class=\"mtk12\">OnInit</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;@angular/core&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">Router</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;@angular/router&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">config</span><span class=\"mtk1\"> </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;../config&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">ProfileService</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;../profile.service&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">Profile</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;./profile&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">@</span><span class=\"mtk11\">Component</span><span class=\"mtk1\">({</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">selector:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;app-profile&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">templateUrl:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;./profile.component.html&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">styleUrls:</span><span class=\"mtk1\"> [</span><span class=\"mtk8\">&#39;./profile.component.scss&#39;</span><span class=\"mtk1\">],</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk4\">class</span><span class=\"mtk1\"> </span><span class=\"mtk10\">ProfileComponent</span><span class=\"mtk1\"> </span><span class=\"mtk4\">implements</span><span class=\"mtk1\"> </span><span class=\"mtk10\">OnInit</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">profile</span><span class=\"mtk1\">: </span><span class=\"mtk10\">Profile</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">loginRadius</span><span class=\"mtk1\">: </span><span class=\"mtk10\">any</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">constructor</span><span class=\"mtk1\">(</span><span class=\"mtk4\">private</span><span class=\"mtk1\"> </span><span class=\"mtk12\">configService</span><span class=\"mtk1\">: </span><span class=\"mtk10\">ProfileService</span><span class=\"mtk1\">, </span><span class=\"mtk4\">private</span><span class=\"mtk1\"> </span><span class=\"mtk12\">router</span><span class=\"mtk1\">: </span><span class=\"mtk10\">Router</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">token</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">localStorage</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getItem</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;token&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">ngOnInit</span><span class=\"mtk1\">(): </span><span class=\"mtk10\">void</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">configService</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getProfile</span><span class=\"mtk1\">().</span><span class=\"mtk11\">subscribe</span><span class=\"mtk1\">(</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      (</span><span class=\"mtk12\">data</span><span class=\"mtk1\">: </span><span class=\"mtk10\">Profile</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">profile</span><span class=\"mtk1\"> = { ...</span><span class=\"mtk12\">data</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\">err</span><span class=\"mtk1\">: </span><span class=\"mtk10\">any</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">err</span><span class=\"mtk1\">.</span><span class=\"mtk12\">status</span><span class=\"mtk1\"> === </span><span class=\"mtk7\">403</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">          </span><span class=\"mtk12\">localStorage</span><span class=\"mtk1\">.</span><span class=\"mtk11\">removeItem</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;token&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">          </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">router</span><span class=\"mtk1\">.</span><span class=\"mtk11\">navigate</span><span class=\"mtk1\">([</span><span class=\"mtk8\">&#39;login&#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=\"mtk1\">    );</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">logout</span><span class=\"mtk1\">() {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">localStorage</span><span class=\"mtk1\">.</span><span class=\"mtk11\">removeItem</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;token&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">window</span><span class=\"mtk1\">.</span><span class=\"mtk12\">location</span><span class=\"mtk1\">.</span><span class=\"mtk12\">href</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">`https://</span><span class=\"mtk4\">${</span><span class=\"mtk12\">config</span><span class=\"mtk1\">.</span><span class=\"mtk12\">APP_NAME</span><span class=\"mtk4\">}</span><span class=\"mtk8\">.hub.loginradius.com/auth.aspx?action=logout`</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<p>Similary add the below code to <code>profile.component.html</code> file.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"html\" data-index=\"7\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk1\"> </span><span class=\"mtk12\">class</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;container&quot;</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">h1</span><span class=\"mtk17\">&gt;</span><span class=\"mtk1\">Hello </span><span class=\"mtk4\">{</span><span class=\"mtk1\">{ profile?.Email</span><span class=\"mtk12\">[</span><span class=\"mtk7\">0</span><span class=\"mtk12\">]?.Value }}&lt;/h1&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">  &lt;button (click)=&quot;logout()&quot;&gt;LogOut&lt;/button&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">&lt;/div&gt;</span></span></code></pre>\n<p>The profile component will call the LoginRadius API to fetch the profile details and store them in the <code>profile</code> variable. Using that <code>profile</code>, we are displaying the email in the HTML.\nIt also has the <code>logout()</code> function where we pass the <code>action=logout</code> in the <strong>LoginRadius Auth Page</strong>, which will help us log out the user.</p>\n<p>In the profile component, you can see the two things are used.</p>\n<ul>\n<li>ProfileService - This is the service to fetch the user profile using the token.</li>\n<li>Profile - The model which will be used to store the profile information.</li>\n</ul>\n<p>You can generate the service in the angular using <code>ng</code> CLI by using this command <code>ng generate service profile</code> which will create <code>profile.service.ts</code> with required configuration. Add the below code in the <code>profile.service.ts</code> file.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"ts\" data-index=\"8\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">HttpClient</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;@angular/common/http&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">Injectable</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;@angular/core&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">config</span><span class=\"mtk1\"> </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;./config&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">Profile</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;./profile/profile&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">@</span><span class=\"mtk11\">Injectable</span><span class=\"mtk1\">({</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">providedIn:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;root&#39;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk4\">class</span><span class=\"mtk1\"> </span><span class=\"mtk10\">ProfileService</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">constructor</span><span class=\"mtk1\">(</span><span class=\"mtk4\">private</span><span class=\"mtk1\"> </span><span class=\"mtk12\">http</span><span class=\"mtk1\">: </span><span class=\"mtk10\">HttpClient</span><span class=\"mtk1\">) {}</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">getProfile</span><span class=\"mtk1\">() {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk3\">// now returns an Observable of Config</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">http</span><span class=\"mtk1\">.</span><span class=\"mtk11\">get</span><span class=\"mtk1\">&lt;</span><span class=\"mtk10\">Profile</span><span class=\"mtk1\">&gt;(</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk8\">`https://api.loginradius.com/identity/v2/auth/account?access_token=</span><span class=\"mtk4\">${</span><span class=\"mtk12\">localStorage</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getItem</span><span class=\"mtk1\">(</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk8\">&#39;token&#39;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      )</span><span class=\"mtk4\">}</span><span class=\"mtk8\">&apikey=</span><span class=\"mtk4\">${</span><span class=\"mtk12\">config</span><span class=\"mtk1\">.</span><span class=\"mtk12\">API_KEY</span><span class=\"mtk4\">}</span><span class=\"mtk8\">`</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>We will use the HTTP module to call the Rest API so let's add the <code>HttpClientModule</code> in the  <code>app.module.ts</code> file.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"ts\" data-index=\"9\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">HttpClientModule</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;@angular/common/http&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">...</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">@</span><span class=\"mtk11\">NgModule</span><span class=\"mtk1\">({</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">imports:</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\">HttpClientModule</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=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk4\">class</span><span class=\"mtk1\"> </span><span class=\"mtk10\">AppModule</span><span class=\"mtk1\"> { }</span></span></code></pre>\n<p>Now let's create a <code>Profile</code> model which will be used for storing the user profile. </p>\n<ul>\n<li>\n<p>Add <code>src/app/profile/profile.ts</code></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"ts\" data-index=\"10\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk4\">interface</span><span class=\"mtk1\"> </span><span class=\"mtk10\">Profile</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">Email</span><span class=\"mtk1\">: {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">Type</span><span class=\"mtk1\">: </span><span class=\"mtk10\">string</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">Value</span><span class=\"mtk1\">: </span><span class=\"mtk10\">string</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }[];</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n</li>\n</ul>\n<h3 id=\"add-routes-for-login-and-profile\" style=\"position:relative;\"><a href=\"#add-routes-for-login-and-profile\" aria-label=\"add routes for login and profile 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>Add Routes for Login and profile.</h3>\n<p>Lets modify the <code>app-routing.module.ts</code> and add the below Routes in it.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"ts\" data-index=\"11\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">NgModule</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;@angular/core&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">RouterModule</span><span class=\"mtk1\">, </span><span class=\"mtk12\">Routes</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;@angular/router&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">AppComponent</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;./app.component&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">LoginComponent</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;./login/login.component&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">ProfileComponent</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;./profile/profile.component&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">routes</span><span class=\"mtk1\">: </span><span class=\"mtk10\">Routes</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\">path:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;login&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">component:</span><span class=\"mtk1\"> </span><span class=\"mtk12\">LoginComponent</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  { </span><span class=\"mtk12\">path:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;profile&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk12\">component:</span><span class=\"mtk1\"> </span><span class=\"mtk12\">ProfileComponent</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>\n<span class=\"grvsc-line\"><span class=\"mtk1\">@</span><span class=\"mtk11\">NgModule</span><span class=\"mtk1\">({</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">imports:</span><span class=\"mtk1\"> [</span><span class=\"mtk12\">RouterModule</span><span class=\"mtk1\">.</span><span class=\"mtk11\">forRoot</span><span class=\"mtk1\">(</span><span class=\"mtk12\">routes</span><span class=\"mtk1\">)],</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">exports:</span><span class=\"mtk1\"> [</span><span class=\"mtk12\">RouterModule</span><span class=\"mtk1\">]</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk4\">class</span><span class=\"mtk1\"> </span><span class=\"mtk10\">AppRoutingModule</span><span class=\"mtk1\"> { }</span></span></code></pre>\n<p>Finally, to gather all, we need to modify the <code>app.component.ts</code> and add the routing logic.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"ts\" data-index=\"12\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">Component</span><span class=\"mtk1\">, </span><span class=\"mtk12\">OnInit</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;@angular/core&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> { </span><span class=\"mtk12\">Router</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;@angular/router&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">@</span><span class=\"mtk11\">Component</span><span class=\"mtk1\">({</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">selector:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;app-root&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">templateUrl:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;./app.component.html&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk12\">styleUrls:</span><span class=\"mtk1\"> [</span><span class=\"mtk8\">&#39;./app.component.scss&#39;</span><span class=\"mtk1\">],</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk4\">class</span><span class=\"mtk1\"> </span><span class=\"mtk10\">AppComponent</span><span class=\"mtk1\"> </span><span class=\"mtk4\">implements</span><span class=\"mtk1\"> </span><span class=\"mtk10\">OnInit</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">constructor</span><span class=\"mtk1\">(</span><span class=\"mtk4\">private</span><span class=\"mtk1\"> </span><span class=\"mtk12\">router</span><span class=\"mtk1\">: </span><span class=\"mtk10\">Router</span><span class=\"mtk1\">) {}</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">ngOnInit</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\">window</span><span class=\"mtk1\">.</span><span class=\"mtk12\">location</span><span class=\"mtk1\">.</span><span class=\"mtk12\">pathname</span><span class=\"mtk1\"> === </span><span class=\"mtk8\">&quot;/&quot;</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">localStorage</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getItem</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;token&#39;</span><span class=\"mtk1\">)) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">router</span><span class=\"mtk1\">.</span><span class=\"mtk11\">navigate</span><span class=\"mtk1\">([</span><span class=\"mtk8\">&#39;/profile&#39;</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=\"mtk4\">this</span><span class=\"mtk1\">.</span><span class=\"mtk12\">router</span><span class=\"mtk1\">.</span><span class=\"mtk11\">navigate</span><span class=\"mtk1\">([</span><span class=\"mtk8\">&#39;/login&#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=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<p>And add the <code>router-outlet</code> to the <code>app.component.html</code> file.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"html\" data-index=\"13\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk17\">&lt;</span><span class=\"mtk10\">router-outlet</span><span class=\"mtk17\">&gt;&lt;/</span><span class=\"mtk10\">router-outlet</span><span class=\"mtk17\">&gt;</span></span></code></pre>\n<blockquote>\n<p>You can find the full code in <a href=\"https://github.com/LoginRadius/engineering-blog-samples/tree/master/Angular/angular-authentication-demo\">github</a></p>\n</blockquote>\n<h3 id=\"testing-the-application\" style=\"position:relative;\"><a href=\"#testing-the-application\" aria-label=\"testing the application permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Testing the application</h3>\n<p>Run <code>ng serve</code> to start the local server, and you will be able to see the output on locahost:4200.</p>\n<h3 id=\"adding-login-methods\" style=\"position:relative;\"><a href=\"#adding-login-methods\" aria-label=\"adding login methods 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>Adding Login Methods</h3>\n<p>You can configure the LoginRadius Auth Page by adding social login methods like Facebook, Google, etc. To add the login method, you can use the command <code>lr get social</code> and <code>lr add social</code> command. Check the below image on how to add the social configuration.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 37.53846153846154%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAABYlAAAWJQFJUiTwAAABQklEQVQoz6XQzVLCMBAA4Py0TZs2bUkbSoGCyMHn8lmcUTz4JjqexIMvo4UkFRnGGX0At9CbcNHDN9tsN5tkEWPsDiF0DW6O4Zwv+krdQt3iVE23v+1ziQihO4qpoZhYSPxCKW1cz2swwUf/dzT4BI9IRHIjmKhj4q4gUTsI7yNFuMYQD9+oJrBG3fqIV/AO7lGpJrsyG5lKDm2RKDvvjZp+UthS5HYiq6ZICzuJlC2j3IZBbKTITRYrEwXCBIzr0I8gl60xxtv9DcdqvJsNz001njfz2UWTJbkp0oHticykkTS9ODMsEYb5vqaEatfxtAcodTSMSzsQPZe1rzo0rJLBdpoU+izMzYBLrYJYD0NppC/a4pXjuGuHuWuYZbvplDewAQ9I8fS7DOVWBLw94eOP2vl9gSeAXsASPP/Dsutz9QNDCI3aHsrqdAAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Added Facebook as an loginmethod\"\n        title=\"Added Facebook as an loginmethod\"\n        src=\"/static/c44f54c8139c16bd211fa090ab6b93ea/e5715/lr_add_social.png\"\n        srcset=\"/static/c44f54c8139c16bd211fa090ab6b93ea/a6d36/lr_add_social.png 650w,\n/static/c44f54c8139c16bd211fa090ab6b93ea/e5715/lr_add_social.png 768w,\n/static/c44f54c8139c16bd211fa090ab6b93ea/161ec/lr_add_social.png 1840w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>After adding, visit the LoginRadius Auth Page either by visiting <code>locahost:4200</code> and log out. Or using the command <code>lr demo</code>. You will find the new login method added.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 60.92307692307693%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAABYlAAAWJQFJUiTwAAACnklEQVQoz4WSy2tTQRSHr03bPO8jTdKbpEljmmfTtM1NWirtRlEUC0WpDyiIILhx4R/gSleC4KNt2loRKeJKRAVB7F6X6r8giIKK4kJc2ObO52Raq125+HEYZs435/zO0apDFaojNRxnjHpjnNFag3K5QrFQJFdxyIwd+Y8OU5icwTk8x/CBU2ipZIK8TE7GbSzTwuPxkM/uZaJWYej4RcwlgbW4oWQubqIvbGJsx/bZaqu5SXippaI2PDxMKt2vFO6JkMn00xgbp5BJ0js1h7EChoTqTUFkRZC4I7BvC+KrgvCyUHf/SquOjKIbFh2dXkIBP/lclj4JN30eIvtOY0qg2WwRWHAZXHM5+tjl0COX/Q9dyvJsNndLG6k5FAcG8HZ1EwwEiVo6vfEEfb1hUgfPYSyjHhpSUVlhr6wuvOTSPS+Tr7vqo7Yt7ft21OqNBvV6g5yE9qdTxHtM4nactB3GbBxTQEsC/DJx7EGL8+st5p4LpbMvBKU1oaCWhClgIdtPNpPGjvYQMwJUBtIkYhGCmobpzCgPw8suHTdanFmHt1/h5QfBq4+CN58F008Enluu8lMBB9JJ2V5EetZJyOshY0ep5TOUbD+pqdntllvoMtpX31O88prqfSH9E+TvucoCfbtdBXScEQYLeWwrhOHtlNNOkyuVSFp+IhMn1FAMCTQlUL/2Dd/ldwSbEJJT98lW29Pf5aHj1BmSbdtmEMvfRUy2myuX8e/R8Dmzf6e8BJWbn7j07AsXnn4n0tzYrsrdgSngULFANhGVMI/00EdED1Aq5EiZHrzVaeVhe8q6fByb/0ll9QeDd3/JJXbV3rWBf2AKOFqrkZU+xkJdJMNB8hKeStjkYn4Skyd31mYLCr5F8C9uLfvWOoldwN+dzfiSXpmaSgAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Added Facebook as an loginmethod\"\n        title=\"Added Facebook as an loginmethod\"\n        src=\"/static/e014560a431f67a5a0ce430d7825c6d3/e5715/add_login_method.png\"\n        srcset=\"/static/e014560a431f67a5a0ce430d7825c6d3/a6d36/add_login_method.png 650w,\n/static/e014560a431f67a5a0ce430d7825c6d3/e5715/add_login_method.png 768w,\n/static/e014560a431f67a5a0ce430d7825c6d3/60708/add_login_method.png 2872w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h3 id=\"customizing-theme-for-loginradius-auth-page\" style=\"position:relative;\"><a href=\"#customizing-theme-for-loginradius-auth-page\" aria-label=\"customizing theme for loginradius auth page 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>Customizing theme for LoginRadius Auth Page</h3>\n<p>LoginRadius Dashboard Support three pre-defined themes for you. You can check out the <a href=\"https://dashboard.loginradius.com/auth-page\">Theme Customization</a> section in the LoginRadius Dashboard for all the customization options available. </p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 55.38461538461539%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAABYlAAAWJQFJUiTwAAACc0lEQVQoz42SS0iUURiG/yKwVKTsIlI2qakppRAm3kfTyjRFsytILlpYWIsIF0Kbglq0CYqgEjNo06JFm26bCFO8NmVkOqM5hjWOM15m/pn/MuPg03FGQzCoA8/5zuXj5fvOeaXNmRVEZRwm3ngCy+gYTqcDRfMhqz58vr+jL0VF03EpOg6nE6vViizLSJsySolMKyIup4qRsXGmp6exTdqZnXPhUTQ8XlXgRfZ48SzhVRQUVQ2iaiqaruHz+5lzuZGi9x0kIqWAHVnlTNjs/BkLfjEtMs//DrfsQdq4t5j1SXkYcioxi5Y/tLfT0dlJu1Xj7TiYbPP0f/rM+85uOnr6edfRhenLVyyKjY/u7/TKI3TNjTDgnsAliwqjRLthu3NJLKihu89EUmIC0THbib0xREwLlDyZJedQORHx6SRkFhIWt4eyk/VcsbRSP3iXR8MvaRx8QKP5IRMzTqQNyfmsMWQFBXv6TWSkJrFlWyxpt4epfQPVz2RKyipIPmDk3OUmohLTKa2p46IQaB5uAx3uW19xwXyPO30TSOHi/dbuEoKFx+nq7ccQu5XwyCjCGl4j3ZQxtvyi+tRZUvKOYKytx7A/n9PnL9FsecrVocd0TQ9xa/Q5TSNtDNgcKwRFhX2mAWrP1FFcVknR0WryGq5zrfUF8z4dt8eDy+0WP7z4qzqKT0MJiPOAGoz+hQCq1xMSXBefTVz2Maw/fhIIiAvhL5+wgq540VQFv7DESoJ+1EP4dbHXQusZYTUpXLzhYoU7heA386gwdsiHk/YpJqccIjqC+1XYl5kKIc7sIl+KTDUSnlqEIbdqteASi4n/YjnvN106qDqKGufBAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Theme Customization\"\n        title=\"Theme Customization\"\n        src=\"/static/d17d37653b8853673b79b8ba5638a4a5/e5715/theme_custom.png\"\n        srcset=\"/static/d17d37653b8853673b79b8ba5638a4a5/a6d36/theme_custom.png 650w,\n/static/d17d37653b8853673b79b8ba5638a4a5/e5715/theme_custom.png 768w,\n/static/d17d37653b8853673b79b8ba5638a4a5/0b569/theme_custom.png 2878w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>You can also get/set your current theme using LoginRadius CLI by using the commands like <code>lr get theme</code> and <code>lr set theme</code>.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 83.6923076923077%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAYAAADdRIy+AAAACXBIWXMAABYlAAAWJQFJUiTwAAADZUlEQVQ4y12UWXPaVhzFeSugFUmsEkILYhOb2Q1esMc2jhNsJ2kTZ5J43DbpQ9rvk497eq5MU8cPZ5CG0e+ec/733tTy+3fE374h/vsfNL/+heafX9B4+APR/QPqH+/R+PgZ8ecHdPgc/XYH//Yt/OvX8F7ewHuxRW3zErXzK1TX52i8vkOq+eUrjDCEGcdQwjpkP4ASBFB9H3KtBqMewen1YcddmPxfcqqQbariQCrbkEqVRBnTghUPkIoefofc7sAajVEcjVAeT2D2h9C6Axj81VttqPUGF4ugUppQUOeCIVSPC9d8qK6fLJCPhwR+uoczXyK+2KB/do7FdotwdYD66QXKsyW0qAGdwB+gHURxPahVD4pTo1xIxQqsVhep8O4D7OEQ7nwBmy5r0xkK3R4a+0vk6VwlRGNU7YkjAVOqjyARX6lUIRXKMBsdAt9/QGkyR3x2gd7JKfZfbdE+PoXWG9FdM3Gl/RTvGazsQKay+RL7biEV/PoO/nTKqNdoHx0jpNNosUSOMPUJTHkKswmr7GAlO1HWKsIImkj5b96yzBir6xuMzi8g8eMsP9aew/7rizARUd7BRHcy42bNPHJehJR3fcsyW+xshSYlelNEPEoWjp5FFNOUy4+uRG8SowplchZy1ZDAVzfQWKbJbVLkMFrJMLpwBiOEowk0V7j735mIqYiYO2dynrJKyAqg4xN4tUU0W2CyuUTv8Bgzxl5sXqDP5/HxCWq9AULCnXYMr9tH2BuiTjlRC0GHu6G/B68Zw2+2YQmH4ugMD48wPd+gd3CUgHqrQ4zXp+jM92GI6OXHrn5E5ACyJmUUEmcZ3UJayUEruki5Z5cYHBxiKrYNgQNq72iNmJOO9iao011nOkcpbCQweQeUzAIkI58AswRmFB1a3iGQJ2KyPsH+5VXiTMBcRnMZx6S7ND/W2J1WchKgcCYlzvKPIM1EVjWQljSoZgWp6voMHXbYWzEugS266fIo7vG9PZ4hokONg8gIR9bPsOwOlmHcdFaFapSRsldr6NwOhheiEESwagHlc2I1mNx7Je5Febctkr4IyewgGVlPnAn9kpahaAVeDrfveMvMkR+Mef0MYXUGMFuM2+jyKHWg+02YQYvxmzDcCAYnmbMD5MoedA5Bz1ehmzY0g5dDIcC/z6rgYOE1JiEAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Theme Customization CLI\"\n        title=\"Theme Customization CLI\"\n        src=\"/static/ddbce18605c36183916aa2ca85e5cdc4/e5715/theme_cli.png\"\n        srcset=\"/static/ddbce18605c36183916aa2ca85e5cdc4/a6d36/theme_cli.png 650w,\n/static/ddbce18605c36183916aa2ca85e5cdc4/e5715/theme_cli.png 768w,\n/static/ddbce18605c36183916aa2ca85e5cdc4/669eb/theme_cli.png 1244w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h3 id=\"addingupdating-registeration-schema-for-loginradius-auth-page\" style=\"position:relative;\"><a href=\"#addingupdating-registeration-schema-for-loginradius-auth-page\" aria-label=\"addingupdating registeration schema for loginradius auth page 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>Adding/Updating Registeration Schema for LoginRadius Auth Page</h3>\n<p>LoginRadius Auth Page supports 3 predefined fields for LoginRadius Auth Page i.e Email, Password, Confirm Password. With the help of LoginRadius CLI, you can manage the registration schema for your LoginRadius Auth Page. </p>\n<p>Check out the below commands to add the new registration field in your LoginRadius Application. After adding the new schema field you can always check your LoginRadius Auth Page by running <code>lr demo</code> command from the terminal.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 85.38461538461539%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAYAAADdRIy+AAAACXBIWXMAABYlAAAWJQFJUiTwAAADiUlEQVQ4y02UbXOaaBiF+bRVXgV5FVBARAVFTUxM1FhjTJpM29kmfdnMNL+mf/z0QNLd/XBGGJ3rOefc96Nw+usXspcX9H++IH5+RvLjHyTfviP++g3RlyfEfz8i//GM0dfv6D18RPfuAeHxHuHhDsH+iGB3gH91DW+1Qf/TE4Tel0coSR9GXkAfjaBmQyjpAHKcUDGkXgSN36tRAinsQgxCiH4AseND9Hw03Q6k6tO0YZUnEPo8ffB+j9n9A4qbI+L9DaLtDsHpkjpD72wFt5zBm84QLk4RzOYISorvnWKKYFLCiNMaalfA5PEJy7sPmByPaE+msKdTOAQ40xIO3z0+23Tv5BNYwzGMNIPRH8BIUuhxH3pE92EPkuPBKuYEMnKy3mJ4fYP58RYlXaabLYLlCsHJEt3FCTy6CGcLmIMh5G4EhQA56EL2u5A6AZROCMl2YY5LCCMO4Ixx88MNku2WDkto7FGlE6WfQmZ3ShS/gii1EoEKgYofEhZA9tip5cDMJhCGjLz99Bk5e/SXS7SLCTRG0jgYjbG0+HUgai+uYZU7hc5kulIIkl2/lsihmGlOh1yN5e0dTj/cIzk752T7tVTqD0ypYCFhwX8w+Q0mOR3IdgeiYaGdjCCMuWdLdpddbpCuLjjFBXqcppmNXkF/nL3BlP87q2FerQpoRBmE7ONnFNsrulshnC+gVxNkfxVI+rd4lk6IVEXjNMUKYLloth00DbtWQzNgdFMI0e09svMLzDnlMadd7ZfPqXrjAiH3rDMq4GVjODzETgbw+ez1M7h89iiXa+P0Ehg8rOXHEILdNYr1poZVi6q/7ZfGmDr70+lUZ38a3Wp02qJjjW41AjRG1uhWtTxIuomWF/HqvT8gv7jEfH/AyfUBId3Z3LfKmcyVaNpvESmpkulAZFSRMUXdQrNloqm10VBaaDldRiZwuDzHYk+nHMyQXUa8Wl269Yc5OoMRHEZr0V2DxTepBiENQt6pBt4pOhpyC381FWhWACHmv8WEoOnmCovdHuX6itqil/Oe0mWXivMSAcEe72yH8qv+2JvP/rwwruXwQN0K6XC9Q879Ky7WKC+3GNPtdLVGXJRIJzO0/R6M6sduUHelmi7lQGFklVLotpJMp6ruQgh3N9DTIYysuvgjXnxe/oSKBmhTKoGKy91zeGdt7p7J3Wu7kA0HUsuGpFmQlDZESYduBPgNKCfc/pZ3JFwAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Registration Schema LoginRadius CLI\"\n        title=\"Registration Schema LoginRadius CLI\"\n        src=\"/static/ed279d6255a3f75727dc0bb5c05069e0/e5715/registration_schema.png\"\n        srcset=\"/static/ed279d6255a3f75727dc0bb5c05069e0/a6d36/registration_schema.png 650w,\n/static/ed279d6255a3f75727dc0bb5c05069e0/e5715/registration_schema.png 768w,\n/static/ed279d6255a3f75727dc0bb5c05069e0/161ec/registration_schema.png 1840w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h3 id=\"loginradius-site-management\" style=\"position:relative;\"><a href=\"#loginradius-site-management\" aria-label=\"loginradius site management permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>LoginRadius Site Management</h3>\n<p>LoginRadius Dashboard provides a feature where you can create and manage multiple applications for your multiple products. </p>\n<p>With the help of LoginRadius CLI you can manage your sites via terminal using commands like <code>lr get site</code>, <code>lr set site</code>, <code>lr add site</code>, <code>lr delete site</code>.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 136.46153846153845%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAbCAYAAAB836/YAAAACXBIWXMAABYlAAAWJQFJUiTwAAAE50lEQVRIx32VWXPaWBSEeYljC4SQhHYEArSx72AWY2PipcblZJZkqiZTlaf8/7/Q01csE0/NzMOpayjzqU/3uUe55Pt36FEErdtFIY5RjBMo/CyqGMXQ0hS18QSV4RAqP8v1xqGC+qFqAasOybLh75+QC799gzoYwl+vUVlcw57OYMyX0EcTqJ0Oqwu11UGp1UYpbaGUpCjFrIgPDmNWlJ2yX0Pldo9c8+ufaGy2aD88oH1/D2M4gjaZQx+MDoAM0oJCkEL1pSg+gJrsoBFCaTRZIQqeD3d9S4V/fEVwvUK4+wCXZ219A5Pqiu0utP6ICnsH0BkW/Q2rN1Fk+0WeebcCd7lFLibw/vNnzF8/InnYY/T6gjpbr80XsPqDzMf/hAWNcxVcj4I2bPnL7+hub1ElpLO7R+9+D280RiCAvX7W3glWbIZvYbV6Fog4C44HZ75CLvj1MzS2VSNQQBwGVOCPJf6oQH8yCEv5N1iVsGqQVd52GeiSCn/7gv7+EaOnZyxeXjDlGS3XSFZr9G53sLs9aGxZ+PQWRpAfZOmKylsO7PECufqnX9Dd3KB9t0PrZos+2+7QgunjE0Kq9pm2waTlo1fyj7AKYZVqVnnThj2cs+XXT4ivl0hvbpGsN5mq/t09Jg+P0DlvBeHRD7CsRaFKwLxqNi4yK2/YDHGKXO3lI8q9IaLVBs3ZHGZvAKXdJ4g/5E1Q/g/mEsZxkXlKZYshjqnwp1e4/SHC1Q1szl0xTKAmbajZbUjpXXhosXr0qyJUHWFOJUu3wFMqmzA7I3pI4HC3x/DxGVW23t1/gEOVskg0PIRxMv4Ek08w2zuXpBswWwMqfH7BgpCIIxMt6eV6Bb/bRziZwmK6efpTPMP8tzDLZbpudkqaASPpIed/eEIwnqIymiJd3qDF1stph8l2oAmFnLWz+YQVjrD8CWY6WV2pZRhRlwofntHf3mFEsEdVIefPH4xRqIowwgx4Mv8N7AgS6Yq6KukoN9tM+f4BE85dndetNh5zhBao8eZUuLKKnp+ZflDmnWGZKuMIY7p53cKVoqHcSJETOyyeXaPKljvrLXqbO1itLoyYK4sKZa92Nv4EO4DsbFQk3UReMzOgHiTIVQlMF0v0tjt4wzFa3I1uu4crh2GwbeHfj36dYfoJZiCvGrgsqtCrEUPZ7DAmpEHffK75xnQKh9vYbnLLZDAnS/HQ5qFFAROqBExiGFKpjEu5BK0SsuUVt/VsgSpnr0loOWhC5T3VRLpiYI+mC9AVFZ1alNQD7IowSdFxWVCguQ3knPmaaylGkx6GbLnJW1OOeFPaI3rZgsMS6mTTRYkPkEW7GczIlAnYCajaAXL2bAmX7wwBSyezTG06nsHjHIa84wlVRzzDzgAO1StM90JW8V5UoYT3eQUXkoJ3l3mUzCpyFndYxJGZcsv0+E4Rfs4Z0HRziwlTF7XhaM1oTUcMP+97i9XnQ20uCYPhmW4VOm3RzBpbHs0R8x/aHJ2YKmMqSnh2p/SVo2NUAlj0s2R5MPl3mQBRhl2Bzu8yIEunx2rZF8AFPbKhMNGi8IiJCr9Eift5Kfwpatn5zzYvpCIuLmVWAe/eSSipHl+jTz/Dm65hD+ZcX2yjO4HVHsNKh7CSARdEH2bYhdng/a5TcS2F4ccoexGVNqHbDehmwJYD2E6CvwCOLewZFJTetgAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Site Management in LoginRadius CLI\"\n        title=\"Site Management in LoginRadius CLI\"\n        src=\"/static/fdec753179cfd0aaae5ff08af571768e/e5715/site_management.png\"\n        srcset=\"/static/fdec753179cfd0aaae5ff08af571768e/a6d36/site_management.png 650w,\n/static/fdec753179cfd0aaae5ff08af571768e/e5715/site_management.png 768w,\n/static/fdec753179cfd0aaae5ff08af571768e/07a9c/site_management.png 1440w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h3 id=\"contributing-to-loginradius-cli\" style=\"position:relative;\"><a href=\"#contributing-to-loginradius-cli\" aria-label=\"contributing to loginradius cli 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>Contributing to LoginRadius CLI</h3>\n<p>The <a href=\"https://github.com/LoginRadius/lr-cli/\">LoginRadius CLI</a> is opensourced in the <a href=\"https://github.com/LoginRadius\">LoginRadius Organization</a>  and you can contribute to it if you find any bugs or improvement by following the contributing guidelines. You can also checkout our <a href=\"https://www.loginradius.com/open-source/\">open source page</a> if you wish to contribute more in LoginRadius.</p>\n<h3 id=\"your-take\" style=\"position:relative;\"><a href=\"#your-take\" aria-label=\"your take 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>Your Take</h3>\n<p>With the help of LoginRadius CLI, you can setup the authentication for your Angular application in just 5 minutes. LoginRadius will take care of all the authentication-related stuff for your application so that you can focus on your application development.</p>\n<p>I hope you like this tutorial. Kindly provide feedback suggestions in the comment section below.</p>\n<p>Cheers!!!</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk10 { color: #4EC9B0; }\n  .dark-default-dark .mtk7 { color: #B5CEA8; }\n  .dark-default-dark .mtk17 { color: #808080; }\n  .dark-default-dark .mtk3 { color: #6A9955; }\n</style>","frontmatter":{"date":"April 14, 2021","updated_date":null,"description":"In this tutorial, you will learn about how to implement the authentication for Angular 2+ application in just 5 mins. We will be using LoginRadius for authentication.","title":"Implement Authentication in Angular 2+ application using LoginRadius CLI in 5 mins","tags":["Authentication","Angular","CLI","LoginRadius CLI"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/7c2ac2ca4ca6e495e226891293c79e92/14b42/angulat_demo_auth.jpg","srcSet":"/static/7c2ac2ca4ca6e495e226891293c79e92/f836f/angulat_demo_auth.jpg 200w,\n/static/7c2ac2ca4ca6e495e226891293c79e92/2244e/angulat_demo_auth.jpg 400w,\n/static/7c2ac2ca4ca6e495e226891293c79e92/14b42/angulat_demo_auth.jpg 800w,\n/static/7c2ac2ca4ca6e495e226891293c79e92/47498/angulat_demo_auth.jpg 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Mohammed Modi","github":"mohammed786","avatar":null}}}},{"node":{"excerpt":"How Git Local Repository Works Let's understand how git set up a local repository\nOnce we initialize or clone any git project that will set…","fields":{"slug":"/engineering/how-git-local-repository-works/"},"html":"<h1 id=\"how-git-local-repository-works\" style=\"position:relative;\"><a href=\"#how-git-local-repository-works\" aria-label=\"how git local repository works permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How Git Local Repository Works</h1>\n<p>Let's understand how git set up a local repository\nOnce we initialize or clone any git project that will set up a local project environment.</p>\n<p>that whole environment will look like the below picture </p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 46.61538461538461%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAABJ0AAASdAHeZh94AAABnklEQVQoz3VR2U7CUBDt/z/y6hLjm0+GJ6wLCSpiBRUpbSmllS6E0gKBQEopy/HOmEbjMsn03s6dOTPnjARhs9kMYThCHMUYj8fYZBn2+z0mkwniOBYecU6e+/zcQKv1Bk3ToKoqDMOAaZrIRJ1ESW3x8O50EEUhjI6JvuthMBigUX8SZ4Buz4ZSbyBJM1zflFE8P4OhqwL4BS+vTXRMC7Is8zAMqGk6LKsDP/DxprYZoN93Ua1WMRwO4fk+nup1npAAHNsULFaIBUC6zrBI1qg9Kl+ARE3TdVQqt/B9D+s05fEJrPpQw2uzyXdm01Zh2w4WiwW+2+3dvZAsgrTdbvGX/RdXFAWFQgHlsqBeLKJUKkG+vMLB4RGm0ymk3W73q4him82GQWk5dOYNwjCELtgEQYDjk1OULmTW3exanCvRJ0kSjEYjpjWfz7mQ4lREG+z1etydjJZlWZaQxueNe57HGruuK4bIPgFToRkJSr5cLhmMpqR7Pg3951NSU2riODZ8AZjH6WRA8p/6UYwWs1qtmAHFCDT3vO67JHT/ADhMn7ej6wRWAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"git-local-environment\"\n        title=\"git-local-environment\"\n        src=\"/static/808664775730f7970482cfbf83f9c1cf/e5715/localrepository.png\"\n        srcset=\"/static/808664775730f7970482cfbf83f9c1cf/a6d36/localrepository.png 650w,\n/static/808664775730f7970482cfbf83f9c1cf/e5715/localrepository.png 768w,\n/static/808664775730f7970482cfbf83f9c1cf/21482/localrepository.png 1350w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><strong>Project Folder</strong>: The main folder consists of a workspace and local repository</p>\n<p><strong>Work Directory</strong>: Inside Project Folder where we actually work,  we keep all files and perform many operations like addition, update, deletion of files</p>\n<p><strong>Local Repository</strong>: Here we don't actually change anything, this is handled automatically by git. this consists <strong>staging area</strong>, <strong>commit history</strong>, <strong>stash area</strong> etc.</p>\n<p>Let's get into it step by step and see how we perform command or action and behind the scene, git do its own activity. </p>\n<ul>\n<li>\n<p>Step 1. Git clone and project:\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 15.846153846153847%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABJ0AAASdAHeZh94AAAAr0lEQVQI13WNzQqCQBSFpxH8Q30e8Zl7gSDcRAQludFooh+FzBlBzFwUqJzwrtp04PAt7uU7zDAM2LYN0zRhWRaR8xkYY9A0jRgEAbquQ5IkqKoKQgiUpUSeZyjuJR6Fgjie0DwbsEngeR7VdV04jkNSXddp4FcYRRHqukaapsTbNcNmt8Q2XmC1DtG2r+mf4V8550Tf9zGOI5RSmCKlxDD0+Lx7HC4h9mKOcxbT7Qu2WI87LgIs9gAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"3\"\n        title=\"3\"\n        src=\"/static/1459d0fecf44f2077b4495fe7e2c9d30/e5715/3.png\"\n        srcset=\"/static/1459d0fecf44f2077b4495fe7e2c9d30/a6d36/3.png 650w,\n/static/1459d0fecf44f2077b4495fe7e2c9d30/e5715/3.png 768w,\n/static/1459d0fecf44f2077b4495fe7e2c9d30/d76ab/3.png 1731w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 15.692307692307693%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABJ0AAASdAHeZh94AAAA1ElEQVQI1x2OO0vDYABFQ6ZAQkoeEjLksQSyJ/nfDi4+QLTaUHUQadRKoi1tWiyt/aKbCkfz3eUMF869iq7ruK6LbdtYliVpGAaaptF3iqKQ5zlCCKrqkY/dJ009Y7sRLBdr2uWaVfvO9PmFvdijeJ5HmqYkSUIcx/i+Lwccx/nngRQXRUEnOsY3I6r6nMvykKdmyN3DKeXtCeP7I4bXZ3TdF0r/KIoiwjAkCAIpGgwGmKYpn6qqSpZl/Hz/0q5mLHZXUlC3F8w3JdO3EZPmmNf5hD5/O9qQ15OmR9IAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"4\"\n        title=\"4\"\n        src=\"/static/37b235ac7bc6675864fd990467100e91/e5715/4.png\"\n        srcset=\"/static/37b235ac7bc6675864fd990467100e91/a6d36/4.png 650w,\n/static/37b235ac7bc6675864fd990467100e91/e5715/4.png 768w,\n/static/37b235ac7bc6675864fd990467100e91/d76ab/4.png 1731w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n</li>\n<li>\n<p>Step 2. Explore what we got in repository\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 15.692307692307693%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABJ0AAASdAHeZh94AAAAoUlEQVQI11XOwQqEIBDGcfEU2aGsoEPUpWB7gqDe/2067LqwLjXjt6OHYMEfOIJ/VWVZwtY1qqq65XmOLMtgjIFSCuu6wnsPZkYI4Z+cEdE9q2ma8FgWzPOMcRzRdR1qeSBqmiaF933HcRxw7g3ieBE4L8Lz5fDx3+QiTlTf9xiGIcXivm1bWGtRFEWitca2bRJzuCTCEpQlggRIfsdJnKMffWycLAkZZicAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"5\"\n        title=\"5\"\n        src=\"/static/d106fd3e9c47d03c8e312c37f384b074/e5715/5.png\"\n        srcset=\"/static/d106fd3e9c47d03c8e312c37f384b074/a6d36/5.png 650w,\n/static/d106fd3e9c47d03c8e312c37f384b074/e5715/5.png 768w,\n/static/d106fd3e9c47d03c8e312c37f384b074/d76ab/5.png 1731w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 15.692307692307693%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABJ0AAASdAHeZh94AAAAwklEQVQI10WOS06EQBRFWQODaiE0XeEX23WInwU7cwuSGJsBabBDiYYWIgMnBFIeKQb6kpN7cwY3zwrDkDiOiaJoISYIAuROst367JYUYkOapqi65r1u+DyfKcuSruuoF9c0DafTK0op5nnG8n1/HUyShMv9FVJKjDOYLoTg/vaO5+KFh6dH1McbhzxnGAayLKOqKoqiWLvWGstxHP65wHXdPzzPw7Ztbq5T+u8v8vaI/tG0bYs58+U4jkzTRN/3q/sFhQ6YnhhHlOcAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"6\"\n        title=\"6\"\n        src=\"/static/55598410756c12990d2e729cbeb96f1a/e5715/6.png\"\n        srcset=\"/static/55598410756c12990d2e729cbeb96f1a/a6d36/6.png 650w,\n/static/55598410756c12990d2e729cbeb96f1a/e5715/6.png 768w,\n/static/55598410756c12990d2e729cbeb96f1a/d76ab/6.png 1731w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n</li>\n<li>\n<p>Step 3. Do some modification in a files\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 15.692307692307693%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABJ0AAASdAHeZh94AAAAtElEQVQI11WOXQqCUBCFXYVP/iHWvfvQNl076EEoijC0umZhaUhvosmXtwehgY85HJhzxhBCIKVEzAVaz8ft+z6e5+G6LqZpEoYh6qIo8oLn40GaplRVhVKjVxSczyfyPKfvewzHcQiCADkihCSYzbBta8SeAhdhxOawZbleoe5Xdvs9TdMQxzFZlpEkyU8Pw4ChDy3L+kOXaKbAaEH9fpHcjnwYKMsSPfrLtm3puo66rn/eF8J9mRdGK9PhAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"7\"\n        title=\"7\"\n        src=\"/static/2f5ff2c421ac7c4ff9314589c4e38e90/e5715/7.png\"\n        srcset=\"/static/2f5ff2c421ac7c4ff9314589c4e38e90/a6d36/7.png 650w,\n/static/2f5ff2c421ac7c4ff9314589c4e38e90/e5715/7.png 768w,\n/static/2f5ff2c421ac7c4ff9314589c4e38e90/d76ab/7.png 1731w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 16%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABJ0AAASdAHeZh94AAAAx0lEQVQI1zWOwWqDQBCGFz2IiNUVbFEamqdID8mLlz5BL16aHLZow5ptMVXqoRfRytc1NAMf888MDJ+I4xhpuQlDwn+CIMDzPHzfRwjB5nHDqa4x2vB1PlOWJW3borXGGMPx+E5t79M0IR7WaxbuVyvyPCfLMtI0RcqYKIpwXZfddser2vP08oz+PLE/HOj7nqIoqKoKpdQlz/OMWOzukoRbKZGRtbU9sfMVx3Hswy3fPz3q441fZpqmYanFchgGxnGk67rL7g99A5PnN20uggAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"8\"\n        title=\"8\"\n        src=\"/static/a607dc975797d42a0ab7233510330102/e5715/8.png\"\n        srcset=\"/static/a607dc975797d42a0ab7233510330102/a6d36/8.png 650w,\n/static/a607dc975797d42a0ab7233510330102/e5715/8.png 768w,\n/static/a607dc975797d42a0ab7233510330102/d76ab/8.png 1731w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n</li>\n<li>\n<p>Step 4. Add this file in to staging (ready for commit)\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 16.153846153846153%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABJ0AAASdAHeZh94AAAAnUlEQVQI13WOsQ6CMBCGSxghlPch6iqv6uZbODlAaEJbY0KgOzAB6qdtHPWSL5e75P/uhJSSPM8D0vOZPVmWkSQJQgiKosAag2kNbhhomoa+70O31lLXNUoplmVBpGnKP7w0jmMOuz1tZzhdzujOorUOYS90zjF8j/gKQv/JL7wwiiLKY8nj9eR6q6juinEcQ3iaJtZ1Zds25nkOuzdyq5IiSDbhowAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"9\"\n        title=\"9\"\n        src=\"/static/9e0c5445d8afb14f821d3faae048e1be/e5715/9.png\"\n        srcset=\"/static/9e0c5445d8afb14f821d3faae048e1be/a6d36/9.png 650w,\n/static/9e0c5445d8afb14f821d3faae048e1be/e5715/9.png 768w,\n/static/9e0c5445d8afb14f821d3faae048e1be/d76ab/9.png 1731w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 16.153846153846153%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABJ0AAASdAHeZh94AAAArklEQVQI12XMTQuCQBSF4WkscsyV/RNx7/+H6MscMqVc6LQWCVKht2loEXThchb33Eeso4goWhOGIUEQoJTC8zyEEEgpXSZJQlleKIoC0xrO+kzTNOR5TlVVZFmG1pphGBBLf4kKFf7KR3qSxXzhkF8wjmMLtWz3O25tzVbv7PNowRPGGFp7++CfEe55Zld+U4g/ME1TVy7ris31wOZ+5PF60nUd4zgyTRN937vOG0lZj3sVzwZzAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"10\"\n        title=\"10\"\n        src=\"/static/cbefe1b9c76ef7554c405ccaec0ac44c/e5715/10.png\"\n        srcset=\"/static/cbefe1b9c76ef7554c405ccaec0ac44c/a6d36/10.png 650w,\n/static/cbefe1b9c76ef7554c405ccaec0ac44c/e5715/10.png 768w,\n/static/cbefe1b9c76ef7554c405ccaec0ac44c/d76ab/10.png 1731w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n</li>\n<li>\n<p>Step 5. Commit the file\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 16.153846153846153%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABJ0AAASdAHeZh94AAAAo0lEQVQI13WMwQqCQABExUOBCOqXeDW/PQgiCDtm6ppEkBYpdTAFsTVerdDRgccwc3iaZVk4jjNi2zZq/1HfbD5j4fukaYoQgvxyIRNHntUDkQiyLOMQhsRxTN/3aIZhMIVpmui6jud55HlOEifUr5plsGK937IONpT3kqIoiKIIFe0XplAy1a7r0nUdbdPyRrI57xD3E9fqxmcYkFLSNM0o/AITQpBCIUmmJgAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"11\"\n        title=\"11\"\n        src=\"/static/715e8bc5eaacf7162c1b1150d4efbae0/e5715/11.png\"\n        srcset=\"/static/715e8bc5eaacf7162c1b1150d4efbae0/a6d36/11.png 650w,\n/static/715e8bc5eaacf7162c1b1150d4efbae0/e5715/11.png 768w,\n/static/715e8bc5eaacf7162c1b1150d4efbae0/d76ab/11.png 1731w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 16.153846153846153%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABJ0AAASdAHeZh94AAAAtklEQVQI112Mu4qDUABEfYCNitj4+Atb/fJA2hBCZCtXcw1WGrnk1WiICBvOxkuqDByYYZjRgiAgimOiKGLxC57nKXzfx7IssiyjrmuEELRty+EguF6uHMWRpmkoioKqqpjnGS0MQ+L3Yfw5XbLjONi2jeu6GIZBmqZ0XadGj/HB/idn95uz2q6RUtL3PWVZskh7i290XVeYpqlykiRM08QwDGp0kj3yfmbT5pyfN15/L8ZxVN0/A0SRqFQoLAcAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"12\"\n        title=\"12\"\n        src=\"/static/129b4e7311b370cefbf9df51f1442c7d/e5715/12.png\"\n        srcset=\"/static/129b4e7311b370cefbf9df51f1442c7d/a6d36/12.png 650w,\n/static/129b4e7311b370cefbf9df51f1442c7d/e5715/12.png 768w,\n/static/129b4e7311b370cefbf9df51f1442c7d/d76ab/12.png 1731w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n</li>\n<li>\n<p>Step 6. Push the changes\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 16.153846153846153%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABJ0AAASdAHeZh94AAAAo0lEQVQI13WOzQqCQACEV7wp/jyKhwQfuy4+QRGditDd9VSpUBEk6UG2Dl+uh24NfAwMzDAiDEPiOJ6JouiH53n4vo/jOCzSlKrSaK2p65qylLRti5aay+k8uUJKiTEGYUv/CIIA13XJsoymaVBK0fevabziY95sDzuW65zVJqcoC6yEffAPOyaEIEkSxnFkGIa59Oy62ff3guNVc+se9EM/Z1/jhZACptMEmgAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"13\"\n        title=\"13\"\n        src=\"/static/fad4d60001ffd8adcf4485daad7cfd9e/e5715/13.png\"\n        srcset=\"/static/fad4d60001ffd8adcf4485daad7cfd9e/a6d36/13.png 650w,\n/static/fad4d60001ffd8adcf4485daad7cfd9e/e5715/13.png 768w,\n/static/fad4d60001ffd8adcf4485daad7cfd9e/d76ab/13.png 1731w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 16.153846153846153%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABJ0AAASdAHeZh94AAAAxklEQVQI1yWOTWuDQBRFB0QRFQQ/sFm7UZcV/3V32fQHZJtSkqrjojQYIaGlEXSj3ZxMpg8uBy7cxxFJkvC02fBgFEWEYUgQBLiui+s4CCF4Lku6rkNKSd/31HXNMAw0iqevE10jaZuWdV0RRVGQ5zlZlpGmKXEc6/i+r2MYBlVVMZzPNG3LNE36+Z8aH44HtrtXXnZb3j7eeZxwlIXnef9GKpZlYZqmpm3b2rBUhsuyMM+zHo3jqHkbb1x/v5E/n+wvR93dAWwlksDbUfdlAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"14\"\n        title=\"14\"\n        src=\"/static/ed2244f3d6a9668946ee6cfc78d5ef6f/e5715/14.png\"\n        srcset=\"/static/ed2244f3d6a9668946ee6cfc78d5ef6f/a6d36/14.png 650w,\n/static/ed2244f3d6a9668946ee6cfc78d5ef6f/e5715/14.png 768w,\n/static/ed2244f3d6a9668946ee6cfc78d5ef6f/d76ab/14.png 1731w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n</li>\n</ul>\n<p>Hope this makes clear how git handling things at the local repository.</p>\n<blockquote>\n<p>Note: <a href=\"https://compile7.org/decompile/how-to-automate-workflows-with-git-hooks/\">Click here to learn how you can automate your Git workflows with Hooks</a></p>\n</blockquote>\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":"April 12, 2021","updated_date":null,"description":"In this article, I will talk about how Git Local Repository Works","title":"How Git Local Repository Works","tags":["GIT"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/326443284e0af982c65082fa6f3a393d/ee604/git.png","srcSet":"/static/326443284e0af982c65082fa6f3a393d/69585/git.png 200w,\n/static/326443284e0af982c65082fa6f3a393d/497c6/git.png 400w,\n/static/326443284e0af982c65082fa6f3a393d/ee604/git.png 800w,\n/static/326443284e0af982c65082fa6f3a393d/f3583/git.png 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Abhimanyu Singh Rathore","github":"abhir9","avatar":null}}}},{"node":{"excerpt":"Do you have a WordPress site? Do you run a business with hundreds or thousands of users? Then, you might want your consumers to seamlessly…","fields":{"slug":"/engineering/sso-for-wordpress-site/"},"html":"<p><strong>Do you have a WordPress site?</strong></p>\n<p><strong>Do you run a business with hundreds or thousands of users?</strong></p>\n<p>Then, you might want your consumers to seamlessly move between your multiple sites without them having to re-enter their credentials, right?\nAsking them to re-authenticate is a cumbersome process. This is where SSO helps you!</p>\n<p>Businesses thrive by providing a seamless experience to their consumers. So, yes! Whether you are running an ecommerce business, travel, hospitality, or even blogging, you can only attract consumers to provide them with frictionless experiences. </p>\n<h2 id=\"what-is-sso\" style=\"position:relative;\"><a href=\"#what-is-sso\" aria-label=\"what is sso 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 is SSO</h2>\n<p><a href=\"https://www.loginradius.com/single-sign-on/\"><b>Single Sign-On (SSO)</b></a> refers to the authentication process that allows your customers to access multiple applications with a single set of login credentials and an active login session.</p>\n<h3 id=\"sso---for-a-seamless-user-experience\" style=\"position:relative;\"><a href=\"#sso---for-a-seamless-user-experience\" aria-label=\"sso   for a seamless user experience 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>SSO - For a seamless user experience</h3>\n<p>Having SSO for your WordPress sites will boost the experience of the consumer spending time on your site. It is relatively effortless nowadays to build a fancy-looking site that will attract consumers at first.\nBut, for a site to gain traction and make those consumers return to your site will be a challenge.\nFor example, by offering a frictionless experience and having no barriers like complicated registration forms, asking not to sign in repeatedly will make your site stand out over your competitors.\nSSO helps your consumers navigate across your multiple web properties. Once the user is logged in, they don't have repeated demands for sign-ins. The experience is frictionless.</p>\n<h2 id=\"sso-with-loginradius\" style=\"position:relative;\"><a href=\"#sso-with-loginradius\" aria-label=\"sso with loginradius 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>SSO with LoginRadius</h2>\n<p>Adding SSO to your existing web properties can be a challenge. LoginRadius WordPress Plugin is an out-of-box solution that replaces the WordPress default login form with the LoginRadius JS forms.</p>\n<p>With minimal time and effort, you can add SSO to your existing sites leveraging LoginRadius WordPress Plugin and gain access to login data via our dashboard. This will help you to boost conversion and also reduce the time to onboard consumers. </p>\n<p>We have detailed <a href=\"https://www.loginradius.com/developers/\">documentation</a>.</p>\n<h3 id=\"its-here-to-help-developers\" style=\"position:relative;\"><a href=\"#its-here-to-help-developers\" aria-label=\"its here to help developers 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>It's Here to Help Developers</h3>\n<p>LoginRadius aims to help developers, web development agencies, and businesses to add SSO in the simplest way possible.\nLoginRadius allows you to store your consumer profiles securely and add our customizable login interfaces into your applications in minutes. By enabling our SSO, you can create a frictionless user experience, thus boosting your conversion rate.</p>\n<p><a href=\"https://www.loginradius.com/resource/loginradius-single-sign-on/\"><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 30.307692307692307%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAAAsSAAALEgHS3X78AAABkUlEQVQY002Qv0tbURiGL6LmemOLoCipMdVofmiutSTRm2gSbRKMQS0oqCRpQboZuTilHWpdJIP+IzqVthSKUhDSpU5OLg5dsmRTSCIO1cdzb0Lp8Jxz4Dvf+77fJ3W4IxhYPRE6vVFBrHF7DCIozbqBPDKN4kvQE1qheyJBh5pE9s4iu2aQm38k41BE85AawOVxMzg8gtPtxeefQg1o9KpRLK6mqGi0jidxxDOMJTdQtFXkFylhOtMwFHVT0CIeajBMej5BLBYl4H/J+voamWyGntFp2l2NpM8m0zhCS/QHF7AJ7AKHtsiAtsRT31xT0IgrGsKvUuSyG+TzW3x4X6BYLKLrOn3j/yUU9PrnsQuR5+Fl7ELcFkzzZKwx9r+R25whvpyccXdbp1wuU6lUTG7rdZLZbVoGp5D6/WzvHnJ59YfPP844+nrC8bdTSucXnJZ+06XGaRc7lhRTMMz3n7+AB65vbqhWq9RqNe7v/5J6qyMNBGkVptrrTfIfD8jtfCKr75q8K+zzZmePztGYubpHveXjbvKsd6kAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"DS-SSO\"\n        title=\"DS-SSO\"\n        src=\"/static/93476b7d6cd257f74ac39f36e32ef1b5/e5715/DS-SSO.png\"\n        srcset=\"/static/93476b7d6cd257f74ac39f36e32ef1b5/a6d36/DS-SSO.png 650w,\n/static/93476b7d6cd257f74ac39f36e32ef1b5/e5715/DS-SSO.png 768w,\n/static/93476b7d6cd257f74ac39f36e32ef1b5/81501/DS-SSO.png 2886w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></a></p>\n<h2 id=\"benefits\" style=\"position:relative;\"><a href=\"#benefits\" aria-label=\"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>Benefits</h2>\n<p><a href=\"https://laura-nutt088.medium.com/loginradius-launches-wordpress-authentication-sso-plugin-to-streamline-login-experiences-fa5b00b4fbf2\" rel=\"nofollow\"><b>LoginRadius SSO plugin</b></a> for WordPress improves your consumers' experience by taking away password fatigue and the need to create new profiles or re-enter an email/password. Apart from configuring SSO, the LoginRadius WordPress plugin offers other benefits such as:</p>\n<ul>\n<li>Centralised registration/login</li>\n<li><a href=\"https://www.loginradius.com/standard-login/\"><b>Standard login</b></a> (email login)</li>\n<li><a href=\"https://www.loginradius.com/social-login/\"><b>Social login</b></a> (Facebook, Google, Twitter)</li>\n<li><a href=\"https://www.loginradius.com/user-management/\"><b>User management</b></a></li>\n<li>Customizable interfaces for login, registration, and forgot password pages</li>\n</ul>\n<h2 id=\"your-take\" style=\"position:relative;\"><a href=\"#your-take\" aria-label=\"your take 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>Your Take?</h2>\n<p>We always want to hear from our customers. Like many others in the market, we want developers to install it and offer feedback. This feedback will help us enhance the plugin and make it more user-friendly.</p>\n<p><a href=\"https://www.loginradius.com/book-a-demo/\"><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 30.307692307692307%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAAAsSAAALEgHS3X78AAABdElEQVQY002RO0/CUBzFG6PtbZWHCAmRmBB5P8vDII9SSC0omog4oAEGjZMO6OKEuLjoJ2Fx0cSBwUQnXZxcHPwux38LJA7nNvfec8+5v1tOCCiwpbbhye2BxbYgBMtgIRVioDRRsARGXxZUzLlEHmehBaesQ4rrEMPViYf2DR9nDGKkChbVICVqsMt1WJI1sHCFwhUsUIFohJH49TxECvRUjhDW2mAbB5iP6hB8hUkhiRPN5KIZYJdrsEYrcCSpmQqMm6/m9ylUhSulY7N5ivROB3L9GOlGF3Ktbc4zuz341UPw/uIk0ESbBjoSGlYIx8BfzjSwVmyCEYEUUmCPa3Bnd+hwC75yC95S05SxbolU/iEbOCFCpDexEfIioTNCNd6Tp6IlMnNuGeeDe3z//OLx5RWj5zFGT2O8fXxh/P4Ja6w6vSEFCnTIlW2YiDzhzX7ATFKojDlvjpBPcDF4QPdyiG5/iE7/BmfXd+hd3VKpCoG8fzxWw2+c+yTpAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"book-a-demo-Consultation\"\n        title=\"book-a-demo-Consultation\"\n        src=\"/static/fcc4c4b5dc38cc4528f99d09480f4eb2/e5715/book-a-demo-loginradius.png\"\n        srcset=\"/static/fcc4c4b5dc38cc4528f99d09480f4eb2/a6d36/book-a-demo-loginradius.png 650w,\n/static/fcc4c4b5dc38cc4528f99d09480f4eb2/e5715/book-a-demo-loginradius.png 768w,\n/static/fcc4c4b5dc38cc4528f99d09480f4eb2/63ff0/book-a-demo-loginradius.png 2887w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></a></p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"March 26, 2021","updated_date":null,"description":"Providing a seamless experience for your consumers is non-negotiable, especially when running multiple WordPress sites. Single Sign-On provides that experience to your users. Here's how to provide a frictionless experience to your users.","title":"How to add SSO for your WordPress Site!","tags":["WordPress","SSO","Single Sign On"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5151515151515151,"src":"/static/b9dbf4785b8c5c64f26df5ea43566dbb/33aa5/sso-wp.jpg","srcSet":"/static/b9dbf4785b8c5c64f26df5ea43566dbb/f836f/sso-wp.jpg 200w,\n/static/b9dbf4785b8c5c64f26df5ea43566dbb/2244e/sso-wp.jpg 400w,\n/static/b9dbf4785b8c5c64f26df5ea43566dbb/33aa5/sso-wp.jpg 768w","sizes":"(max-width: 768px) 100vw, 768px"}}},"author":{"id":"Saikiran Babladi","github":null,"avatar":null}}}},{"node":{"excerpt":"The Authorization Code Flow for OAuth 2.0 is targeted at web applications that have a server-side component, which allows the client secret…","fields":{"slug":"/engineering/authorization-code-flow-oauth/"},"html":"<p>The Authorization Code Flow for OAuth 2.0 is targeted at web applications that have a server-side component, which allows the client secret for the authorization server to be kept secret (confidential client). Typically, authorization servers will require a secret to be used when making authentication requests if more sensitive data is wanted, such as personal data or refresh tokens. Without it, you would be restricted to following the Implicit flow for <a href=\"https://www.loginradius.com/docs/single-sign-on/tutorial/federated-sso/oauth-2-0/oauth-2-0-overview/\">OAuth 2.0</a>, which only returns an access token from the authorization server.</p>\n<p>In the Authorization Code flow, the server-side component of the web application can freely manage the user's session upon authenticating with the authorization server without revealing anything about the authorization server's response (such as personal data or refresh token) to the end-user.</p>\n<h3 id=\"overview\" style=\"position:relative;\"><a href=\"#overview\" aria-label=\"overview permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Overview</h3>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 59.692307692307686%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAACG0lEQVQoz21SPYsTURSdv2FjZWmhqcKGXQNmQ4hJighRi/0fNsLCFjYKCtZiIcKCwoKNhWAZm+D6MYTETSbJTMgmk4lxM99vZo73vjgalhzmzZn78e49971RkiSBK2LYYQyPmG1ebP8OIsmp74LspSewIk59DsVXQSyZbWXmClx9peHKSw3X3wyx9CNMHYGdtwZuHBvEuiy69GPkTqbInsxQeD/D3I1g0t7cOwPXXo+QOdZheREUTn76zcbj0xVeqA68iJXEeH76C09aluSAfHYg8OjjTzz80MbRpzNc+EKqevZlgcPPpsxlW0likmxOYBkDrObnYHuNhJ5wzYSFZeFBvYb7tA4adRj6iELx33iEFMp8PsferTyyOzlUqlWMx2MIIRCKCH4YQsQJgiCA67podzr4+v2HZMdxpO+s34fabmM8mSCKaGR+aZqGbreL4XAonbwmlNChjdpgIDf6vo9NcA7nV2s1lEolFPf3sVgsoGALuFi5XEY2m5XJ0+m5VNnr9WQTjsd0NFx0NBqhTyqZpUK+ag6GNB47GDwyJ7VpFGZ5htS9Xr+LKh3LvUZDquMmpmnKY7Jte/3b8Cstkv5b28ANVVVFs9lEq9WC53my6J1KBfl8HoXCbVh0cf8Ksrr0e5tqVrK7u4fMzQyKxaK0GTyqruswDOP/yJsKU/A3+zYvgTfxBfKIaaPLUDZVXS64GduGdJJ0sf0H6URhkLI81oUAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Authorization Code Flow Diagram\"\n        title=\"Authorization Code Flow Diagram\"\n        src=\"/static/709b8a5d49870d1186fa474732e74119/e5715/acf.png\"\n        srcset=\"/static/709b8a5d49870d1186fa474732e74119/a6d36/acf.png 650w,\n/static/709b8a5d49870d1186fa474732e74119/e5715/acf.png 768w,\n/static/709b8a5d49870d1186fa474732e74119/e1031/acf.png 803w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>The flow illustrated above aims to provide a rough overview of a typical Authorization Code workflow:</p>\n<ol>\n<li>The Client-Server attempts to access a resource that requires authorization that it does not have. It redirects the user to the authorization server for authentication.</li>\n<li>The Authorization Server authenticates the user by asking for their login credentials. The server determines if the user should be granted or denied their request.</li>\n<li>If the User is determined to be authentic, an Authorization Code is issued and returned to the User Client. This code is used to retrieve an access token from the Authorization Server.</li>\n<li>The retrieved Authorization Code is sent to the Client-Server. </li>\n<li>The Client-Server makes a POST request to the Authorization Server, containing its client key, secret, and Authorization Code.</li>\n<li>The Authorization Server verifies the key, secret and code, and issues an ID Token and access token. The ID Token is a JWT that is typically used to store user data from the Authorization Server.</li>\n<li>The Client-Server receives and processes the ID token and access token. The access token is then kept in the Client-Server, which can request resources on behalf of the User Client without exposing the token itself.</li>\n</ol>\n<p>So you might ask yourself what the whole point of the Authorization Code is. At first glance, it would seem that the code is issued, only to be returned to exchange for an access token. The code is what allows us to keep the token hidden away from the User Client, which could be potentially exposed to malicious agents seeking to steal the token for nefarious means. </p>\n<p>In cases where you'd like the Authorization Server to return the access token immediately, you would use the Implicit flow for OAuth 2.0. Most authorization servers will limit the amount of data that can be returned using this flow; the OAuth 2.0 spec recommends limited scopes and short lifespans for tokens returned using this flow.</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":"March 24, 2021","updated_date":null,"description":"This article will help you to understand the OAuth 2.0 authorization code flow.","title":"Guide to Authorization Code Flow for OAuth 2.0","tags":["Oauth","Authorization Code Flow"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.492537313432836,"src":"/static/70f6529baa97e7fead70e053fa796bcd/14b42/unsplash.jpg","srcSet":"/static/70f6529baa97e7fead70e053fa796bcd/f836f/unsplash.jpg 200w,\n/static/70f6529baa97e7fead70e053fa796bcd/2244e/unsplash.jpg 400w,\n/static/70f6529baa97e7fead70e053fa796bcd/14b42/unsplash.jpg 800w,\n/static/70f6529baa97e7fead70e053fa796bcd/47498/unsplash.jpg 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Nick Chim","github":"nickc95","avatar":null}}}},{"node":{"excerpt":"Overview UniFi is a community of wireless access points, switches, routers, controller devices, VoIP phones, and access control products. It…","fields":{"slug":"/engineering/introduction-to-unifi-ubiquiti-network/"},"html":"<h2 id=\"overview\" style=\"position:relative;\"><a href=\"#overview\" aria-label=\"overview permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Overview</h2>\n<p>UniFi is a community of wireless access points, switches, routers, controller devices, VoIP phones, and access control products. It can be used for the corporate network and also for the home network. An Unifi network controller manages all the equipment in the UNIFI network. The best part of the Unifi network is that its controller can be hosted online with a Ubiquiti account using an Unifi Cloud Key, giving online access to the network to manage the Unifi devices and the connected client so can handle most of the operations remotely.</p>\n<h2 id=\"common-network-architecture\" style=\"position:relative;\"><a href=\"#common-network-architecture\" aria-label=\"common network architecture 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>Common Network Architecture</h2>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 60.30769230769231%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAIAAADtbgqsAAAACXBIWXMAAAsTAAALEwEAmpwYAAABe0lEQVQoz31S20rDQBDNZwr+RfE71FfBX7APvgkigpVobFOxiIpouxEkqbknm3QvM+skkaI1dDlZZoc5zJk5sRBRa23ag+2nEdIiN4grjWmtao2lxEqbUkKpkLegQIKxoig63D/oyIs5u3Uf75zx0/PL2+u7M53ZzuTiyr6+GZ+dX46nszgrqIFGI8AUEq3A9weDvVwAV2aZVSxImB/6SRmk3E+Kj6/EC8IsTb/CMM9yrVTXRqEpFFpFnjPPq6Ui6dAqX2PL+SFvZKGZ+S8A14EClBroJtm0iD9kqohXWKlmQ7yDoqcpBRRC05KI07Q1hvLUZpNMNAp4xQE6CxovpFgR6MEYG54M3Ynb1f8j0zQAUbpMkkgJgQhxkvGqJkepYDQa7ezsHh0d95NJ9pMXnNr3l467COOPIvZLVdE6AUlylKS2+zBfeD3kbmGZFNOQKGZZC6/MMmlyiR04mNUvI6z/NtDAn8FnMy72+oXrfB+55Ix5AND+rNv8/gZgrrEaPs/ydgAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"networkdiagram\"\n        title=\"networkdiagram\"\n        src=\"/static/74a49eba0031db2c0e983be8dd8eadea/e5715/networkdiagram.png\"\n        srcset=\"/static/74a49eba0031db2c0e983be8dd8eadea/a6d36/networkdiagram.png 650w,\n/static/74a49eba0031db2c0e983be8dd8eadea/e5715/networkdiagram.png 768w,\n/static/74a49eba0031db2c0e983be8dd8eadea/29007/networkdiagram.png 1600w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h2 id=\"benefits-of-ubiquiti-unifi-network\" style=\"position:relative;\"><a href=\"#benefits-of-ubiquiti-unifi-network\" aria-label=\"benefits of ubiquiti unifi network permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Benefits of Ubiquiti UniFi Network</h2>\n<ol>\n<li><strong>Easy Deployment</strong></li>\n</ol>\n<p>Having an UniFi Controller on the cloud allows us easy deployment of hardware. On any UniFi network where we have UniFi Security Gateway (USG) Installed, any UniFi equipment plugged into the network is immediately recognized by the Unifi Controller and is also ready for adoption. Whenever the controller adopts the device, the device receives the correct configuration and comes up in the network within a short period.</p>\n<ol start=\"2\">\n<li><strong>Reduced Operating and Hardware Cost</strong></li>\n</ol>\n<p>UniFi devices are ideal and helpful for most small and <a href=\"https://www.loginradius.com/startups/\"><b>startups businesses</b></a> and even for some medium-sized businesses because they don't need the extra cost to buy high-priced products like cisco enterprise equipment. Businesses can achieve almost the same performance with Ubiquiti products. Many products have advanced enterprise hardware that is not even needed, so Ubiquiti is useful for smaller businesses that want enterprise-grade equipment.</p>\n<ol start=\"3\">\n<li><strong>Simplified Length of Service</strong></li>\n</ol>\n<p>UniFi products are built to be controlled remotely and its easy to <a href=\"https://www.loginradius.com/blog/fuel/2021/02/tips-managing-remote-team/\"><b>leading and managing remote teams</b></a>. All the Unifi products are designed with upgrades in mind, and they keep getting updates over some time for the new feature upgradation and the bug fixes.</p>\n<ol start=\"4\">\n<li><strong>Total Visibility</strong></li>\n</ol>\n<p>In the UniFi network, the user can see everything going on in their network, from connected clients, total traffic to speed and throughput tests to information broken down into individual protocol using deep packet inspection available right in the UniFi Controller. UniFi Controller offers information about your network, how it is being used, and that insight can optimize the network for better efficiency. </p>\n<h2 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Conclusion</h2>\n<p>Having an Unifi network at the office or home can be more satisfying in deploying the devices and monitoring the network.  An Unifi controller gives transparency to the network.</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":"March 15, 2021","updated_date":null,"description":"Getting started with Unifi Network for getting the freedom of remote management of network devices. Here's what you need to know about UniFi network.","title":"Introduction to UniFi Ubiquiti Network","tags":["Network","Unifi Networking","Remote Team Management","Startups Solutions"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/1d1284250801614add7b8a6f685aa15b/ee604/cover.png","srcSet":"/static/1d1284250801614add7b8a6f685aa15b/69585/cover.png 200w,\n/static/1d1284250801614add7b8a6f685aa15b/497c6/cover.png 400w,\n/static/1d1284250801614add7b8a6f685aa15b/ee604/cover.png 800w,\n/static/1d1284250801614add7b8a6f685aa15b/f3583/cover.png 1200w,\n/static/1d1284250801614add7b8a6f685aa15b/5707d/cover.png 1600w,\n/static/1d1284250801614add7b8a6f685aa15b/b135e/cover.png 6016w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Roshan Jangid","github":"roshan-jangid","avatar":null}}}}]},"markdownRemark":{"excerpt":"Google has prepared a roadmap to restrict third-party cookies in Chrome. Since 04 January 2024, Chrome has rolled out third-party cookie…","fields":{"slug":"/engineering/identity-impact-of-google-chrome-thirdparty-cookie-restrictions/"},"html":"<p>Google has prepared a roadmap to restrict third-party cookies in Chrome. Since 04 January 2024, Chrome has rolled out third-party cookie restrictions for 1% of stable clients and 20% of Canary, Dev, and Beta clients.</p>\n<p><strong>What does it mean for user authentication?</strong></p>\n<p>On one hand, Google believes third-party cookies are widely used for cross-site tracking, greatly affecting user privacy. Hence, Google wants to phase out (or restrict) supporting third-party cookies in Chrome by early Q2 2025 (subject to regulatory processes).</p>\n<p>On the other hand, Google introduced Privacy Sandbox to support the use cases (other than cross-site tracking and advertising) previously implemented using third-party cookies.</p>\n<p>In this article, we’ll discuss:</p>\n<ul>\n<li>How is user authentication (identity) affected?</li>\n<li>What is Google offering as part of Privacy Sandbox to support various identity use cases when third-party cookies are phased out?</li>\n</ul>\n<h2 id=\"how-is-user-authentication-affected\" style=\"position:relative;\"><a href=\"#how-is-user-authentication-affected\" aria-label=\"how is user authentication affected permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How is User Authentication Affected?</h2>\n<p>Third-party cookie restrictions affect user authentication in three ways, as follows.</p>\n<h3 id=\"external-identity-providers\" style=\"position:relative;\"><a href=\"#external-identity-providers\" aria-label=\"external identity providers 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>External Identity Providers</h3>\n<p>If your website or app uses an external Identity Provider (IdP) — like LoginRadius, the IdP sets a third-party cookie when the user authenticates on your app.</p>\n<h3 id=\"web-sso\" style=\"position:relative;\"><a href=\"#web-sso\" aria-label=\"web sso 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>Web SSO</h3>\n<p>If you have multiple apps across domains within your organization and authentication is handled using an IdP (internal or external) with web SSO, you already use third-party cookies to facilitate seamless access for each user using a single set of credentials.</p>\n<p>If you have implemented web SSO with one primary domain and multiple sub-domains of the primary domain, third-party cookie restrictions may not apply. For now, Google doesn’t consider the cookies set by sub-domains as third-party cookies, although this stance may change in the future.</p>\n<p>For example, you have apps at <code>example.com</code>, <code>travel.example.com</code>, <code>stay.example.com</code>, and web SSO is handled by <code>auth.example.com</code>. In this case, third-party cookie restrictions don’t apply.</p>\n<h3 id=\"federated-sso\" style=\"position:relative;\"><a href=\"#federated-sso\" aria-label=\"federated sso 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>Federated SSO</h3>\n<p>Federated SSO is similar to, albeit different from, web SSO. It can handle multiple IdPs and applications—aka., Service Providers (SPs)—spanning multiple organizations. It can also implement authentication scenarios that are usually implemented through web SSO.</p>\n<p>Usually, authentication is handled on a separate pop-up or page when the user wants to authenticate rather than on the application or website a user visits. </p>\n<p>For example, you already use federated SSO if you facilitate authentication for a set of apps through multiple social identity providers as well as traditional usernames and passwords.</p>\n<blockquote>\n<p><strong>Note</strong>: It is also possible to store tokens locally, not within cookies. In this case, third-party cookie restrictions won’t affect token-based authentication. However, the restrictions still affect authentication where tokens are stored within third-party cookies (a common and secure method).</p>\n</blockquote>\n<h2 id=\"chromes-alternatives-for-third-party-cookies\" style=\"position:relative;\"><a href=\"#chromes-alternatives-for-third-party-cookies\" aria-label=\"chromes alternatives for third party cookies 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>Chrome’s Alternatives for Third-Party Cookies</h2>\n<p>Google has been developing alternative features and capabilities for Chrome to replace third-party cookies as part of its Privacy Sandbox for Web initiative.</p>\n<p>Specific to authentication, Google recommends the following:</p>\n<ol>\n<li>Cookies Having Independent Partitioned State (CHIPS)</li>\n<li>Storage Access API</li>\n<li>Related Website Sets</li>\n<li>Federated Credential Management (FedCM) API</li>\n</ol>\n<h3 id=\"cookies-having-independent-partitioned-state-chips\" style=\"position:relative;\"><a href=\"#cookies-having-independent-partitioned-state-chips\" aria-label=\"cookies having independent partitioned state chips 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>Cookies Having Independent Partitioned State (CHIPS)</h3>\n<p><a href=\"https://developers.google.com/privacy-sandbox/3pcd/chips\">CHIPS</a> are a restricted way of setting third-party cookies on a top-level site without making them accessible on other top-level sites. Thus, they limit cross-site tracking and enable specific cross-site functionalities, such as maps, chat, and payment embeds.</p>\n<p>For example, a user visits <code>a.com</code> with a map embed from <code>map-example.com</code>, which can set a partitioned cookie that is only accessible on a.com. </p>\n<p>If the user visits <code>b.com</code> with a map embed from <code>map-example.com</code>, it cannot access the partitioned cookie set on <code>a.com</code>. It has to create a separate partitioned cookie specific to <code>b.com</code>, thus blocking cross-site tracking yet allowing limited cross-site functionality.</p>\n<p>You should specifically opt for partitioned cookies (CHIPS), which are set with partitioned and secure cookie attributes.</p>\n<p>If you’re using an external identity provider for your application, CHIPS is a good option to supplant third-party cookie restrictions. </p>\n<p>However, CHIPS may not be ideal if you have a web SSO or federated SSO implementation. It creates separate partitioned cookies for each application with a separate domain, which can increase complexity and create compatibility issues.</p>\n<h3 id=\"storage-access-api\" style=\"position:relative;\"><a href=\"#storage-access-api\" aria-label=\"storage access api 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>Storage Access API</h3>\n<p>With <a href=\"https://developers.google.com/privacy-sandbox/3pcd/storage-access-api\">Storage Access API</a>, you can access the local storage in a third-party context through iframes, similar to when users visit it as a top-level site in a first-party context. That is, it gives access to unpartitioned cookies and storage.</p>\n<p>Storage Access API requires explicit user approval to grant access, similar to locations, camera, and microphone permissions. If the user denies access, unpartitioned cookies and storage won’t be accessible in a third-party context.</p>\n<p>It is most suitable when loading cross-site resources and interactions, such as:</p>\n<p>Verifying user sessions when allowing interactions on an embedded social post or providing personalization for an embedded video.\nEmbedded documents requiring user verification status to be accessible.</p>\n<p>As it requires explicit user approval, it is advisable to use Storage Access API when you can’t implement an identity use case with the other options.</p>\n<h3 id=\"related-website-sets\" style=\"position:relative;\"><a href=\"#related-website-sets\" aria-label=\"related website sets 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>Related Website Sets</h3>\n<p>With <a href=\"https://developers.google.com/privacy-sandbox/3pcd/related-website-sets\">Related Website Sets</a>, you can declare a <code>primary</code> website and <code>associatedSites</code> for limited purposes to grant third-party cookie access and local storage for a limited number of sites.</p>\n<p>Chrome automatically recognizes related website sets declared, accepted, and maintained in this open-source GitHub repository: <a href=\"https://github.com/GoogleChrome/related-website-sets\">Related Website Sets</a></p>\n<p>It provides access through Storage Access API directly without prompting for user approval, but only after the user interacts with the relevant iframe.</p>\n<p>It is important to declare a limited number of domains in related website sets that are meaningful and used for specific purposes. Google may block or suspend any exploitative use of this feature.</p>\n<p>The top-level site can also request approval for specific cross-site resources and scripts to Storage Access API using <code>resuestStorageAccessFor()</code> API.</p>\n<p>If you’re using an external identity provider for your web application, you can declare the domain of the identity provider in the related set to ensure limited third-party cookies and storage access to the identity provider, thus ensuring seamless user authentication.</p>\n<p>Related Website Sets can also work to supplement third-party cookie restrictions in web SSO and federated SSO if the number of web applications (or domains) is limited.</p>\n<h3 id=\"federated-credential-management-fedcm-api\" style=\"position:relative;\"><a href=\"#federated-credential-management-fedcm-api\" aria-label=\"federated credential management fedcm api 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>Federated Credential Management (FedCM) API</h3>\n<p>FedCM API enables federated SSO without third-party cookies.</p>\n<p>With FedCM API, a user follows these steps for authentication:</p>\n<ol>\n<li>The User navigates to a Service Provider (SP) — aka., Relying Party (RP)</li>\n<li>As the user requests to authenticate, the SP requests the browser through FedCM API to initiate authentication.</li>\n<li>The browser displays a list of available identity providers (supported by the RP), such as social IdPs like Google, Apple, LinkedIn, and Facebook, or other OAuth IdPs like LoginRadius.</li>\n<li>Once the user selects an IdP, the browser communicates with the IdP. Upon valid authentication, the IdP generates a secure token.\nThe browser delivers this secure token to the RP to facilitate user authorization.</li>\n</ol>\n<p>You can access a user demo of FedCM here: <a href=\"https://fedcm-rp-demo.glitch.me/\">FedCM</a>. </p>\n<p>For more information about implementing federated SSO with FedCM API, go through the <a href=\"https://developers.google.com/privacy-sandbox/3pcd/fedcm-developer-guide\">FedCM developer guide</a>.</p>\n<h2 id=\"how-is-loginradius-preparing-for-the-third-party-cookie-phase-out\" style=\"position:relative;\"><a href=\"#how-is-loginradius-preparing-for-the-third-party-cookie-phase-out\" aria-label=\"how is loginradius preparing for the third party cookie phase out permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How is LoginRadius Preparing for the Third-party Cookie Phase-out?</h2>\n<p>Firstly, we’re committed to solving our customers' user identity pain points — and preparing for the third-party cookies phase-out is no different.</p>\n<p>We’ll implement the most relevant and widely useful solutions to facilitate a smooth transition for our customers.</p>\n<p>Please subscribe to our blog for more information. We’ll update you on how we help with the third-party cookie phase-out.</p>\n<h2 id=\"in-conclusion\" style=\"position:relative;\"><a href=\"#in-conclusion\" aria-label=\"in 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>In Conclusion</h2>\n<p>The proposed changes to phase out third-party cookies and suggested alternatives are evolving as Google has been actively collaborating and discussing changes with the border community.</p>\n<p>Moreover, browsers like Firefox, Safari, and Edge may approach restricting third-party cookies differently than Google does.</p>\n<p>From LoginRadius, we’ll keep you updated on what we’re doing as a leading Customer Identity and Access Management (CIAM) vendor to prepare for the third-party cookie phase-out.</p>\n<h2 id=\"glossary\" style=\"position:relative;\"><a href=\"#glossary\" aria-label=\"glossary 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>Glossary</h2>\n<p><strong>Top-level site</strong>: It is the primary site a user has visited.</p>\n<p><strong>First-party cookie</strong>: A cookie set by the top-level site.</p>\n<p><strong>Third-party cookie</strong>: A cookie set by a domain other than the top-level site. For example, let’s assume that a user has visited <code>a.com</code>, which might use an embed from <code>loginradius.com</code> to facilitate authentication. If <code>loginradius.com</code> sets a cookie when the user visits <code>a.com</code>, it is called a third-party cookie as the user hasn’t directly visited <code>loginradius.com</code>.</p>\n<h2 id=\"references\" style=\"position:relative;\"><a href=\"#references\" aria-label=\"references 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>References</h2>\n<ul>\n<li><a href=\"https://developers.google.com/privacy-sandbox/3pcd/prepare/prepare-for-phaseout\">Changes to Chrome's treatment of third-party cookies</a></li>\n<li><a href=\"https://developers.google.com/privacy-sandbox/3pcd/guides/identity\">Check the impact of the third-party cookie changes on your sign-in workflows</a></li>\n</ul>\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":"July 08, 2024","updated_date":null,"description":"Google Chrome has planned to phase out third-party cookies, which will affect different website functionalities depending on third-party cookies. This blog focuses on how this phase-out affects identity and user authentication and discusses alternatives for overcoming challenges.","title":"How Chrome’s Third-Party Cookie Restrictions Affect User Authentication?","tags":["Identity","Cookies","Chrome"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/eb7396060c0adc430dbed2d04b63d431/ee604/third-party-cookies-phaseout-chrome.png","srcSet":"/static/eb7396060c0adc430dbed2d04b63d431/69585/third-party-cookies-phaseout-chrome.png 200w,\n/static/eb7396060c0adc430dbed2d04b63d431/497c6/third-party-cookies-phaseout-chrome.png 400w,\n/static/eb7396060c0adc430dbed2d04b63d431/ee604/third-party-cookies-phaseout-chrome.png 800w,\n/static/eb7396060c0adc430dbed2d04b63d431/f3583/third-party-cookies-phaseout-chrome.png 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Raghunath Reddy","github":"raghunath-r-a","avatar":null}}}},"pageContext":{"limit":6,"skip":66,"currentPage":12,"type":"//engineering//","numPages":52,"pinned":"17fa0d7b-34c8-51c4-b047-df5e2bbaeedb"}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}