{"id":2347,"date":"2024-08-16T12:55:50","date_gmt":"2024-08-16T11:55:50","guid":{"rendered":"https:\/\/codeflarelimited.com\/blog\/?p=2347"},"modified":"2024-08-16T16:11:30","modified_gmt":"2024-08-16T15:11:30","slug":"authentication-in-react-js","status":"publish","type":"post","link":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/","title":{"rendered":"How to Implement Authentication in React.js"},"content":{"rendered":"\n<p>Authentication is a critical aspect of any web application, as it ensures that only authorized users can access certain parts of your app. In React.js, there are several ways to implement authentication, depending on your needs. First, we&#8217;ll explore the basics of setting up an authentication system in React.js. Next, we&#8217;ll dive into using token-based authentication. Finally, we&#8217;ll show you how to handle protected routes, ensuring that your application remains secure and user-friendly.<br><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. Setting Up Your React.js Project<\/strong><\/h4>\n\n\n\n<p>First, ensure you have Node.js installed, and create a new React.js project if you haven&#8217;t already:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">npx create-react-app react-auth\ncd react-auth\n<\/code><\/pre>\n\n\n\n<p>Next, install the necessary dependencies for authentication:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">npm install axios react-router-dom\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Axios<\/strong> will be used to make HTTP requests to your backend for login, signup, and authentication.<\/li>\n\n\n\n<li><strong>React Router<\/strong> helps manage routing in your application, including protected routes.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2. Creating a Simple Authentication Flow<\/strong><\/h4>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>a. Setting Up the Backend<\/strong><\/h4>\n\n\n\n<p>You&#8217;ll need a backend to handle user authentication. For simplicity, let&#8217;s assume you have an API that supports user login and returns a JWT (JSON Web Token) upon successful authentication.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>b. Creating the Login Component<\/strong><\/h4>\n\n\n\n<p>In your React project, create a <code>Login.js<\/code> component:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">import React, { useState } from 'react';\nimport axios from 'axios';\n\nconst Login = ({ setAuth }) =&gt; {\n  const [email, setEmail] = useState('');\n  const [password, setPassword] = useState('');\n\n  const handleLogin = async (e) =&gt; {\n    e.preventDefault();\n    try {\n      const response = await axios.post('\/api\/login', { email, password });\n      const token = response.data.token;\n      localStorage.setItem('authToken', token);\n      setAuth(true);\n    } catch (error) {\n      console.error('Login failed', error);\n    }\n  };\n\n  return (\n    &lt;form onSubmit={handleLogin}&gt;\n      &lt;input\n        type=\"email\"\n        placeholder=\"Email\"\n        value={email}\n        onChange={(e) =&gt; setEmail(e.target.value)}\n        required\n      \/&gt;\n      &lt;input\n        type=\"password\"\n        placeholder=\"Password\"\n        value={password}\n        onChange={(e) =&gt; setPassword(e.target.value)}\n        required\n      \/&gt;\n      &lt;button type=\"submit\"&gt;Login&lt;\/button&gt;\n    &lt;\/form&gt;\n  );\n};\n\nexport default Login;\n<\/code><\/pre>\n\n\n\n<p>This component allows the user to input their email and password and sends a POST request to the login API endpoint. If the login is successful, it stores the JWT token in <code>localStorage<\/code> and updates the authentication state.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>c. Managing Authentication State<\/strong><\/h4>\n\n\n\n<p>In your <code>App.js<\/code> file, manage the authentication state:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">import React, { useState } from 'react';\nimport { BrowserRouter as Router, Route, Redirect } from 'react-router-dom';\nimport Login from '.\/Login';\nimport Dashboard from '.\/Dashboard';\n\nfunction App() {\n  const [isAuth, setIsAuth] = useState(false);\n\n  return (\n    &lt;Router&gt;\n      &lt;Route path=\"\/login\"&gt;\n        {isAuth ? &lt;Redirect to=\"\/dashboard\" \/&gt; : &lt;Login setAuth={setIsAuth} \/&gt;}\n      &lt;\/Route&gt;\n      &lt;PrivateRoute path=\"\/dashboard\" component={Dashboard} isAuth={isAuth} \/&gt;\n    &lt;\/Router&gt;\n  );\n}\n\nconst PrivateRoute = ({ component: Component, isAuth, ...rest }) =&gt; (\n  &lt;Route\n    {...rest}\n    render={(props) =&gt;\n      isAuth ? &lt;Component {...props} \/&gt; : &lt;Redirect to=\"\/login\" \/&gt;\n    }\n  \/&gt;\n);\n\nexport default App;\n<\/code><\/pre>\n\n\n\n<p>Here\u2019s what\u2019s happening:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Authentication State:<\/strong> <code>isAuth<\/code> is used to track whether the user is authenticated.<\/li>\n\n\n\n<li>PrivateRoute checks user authentication and redirects unauthenticated users to the login page.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>d. Protecting Routes<\/strong><\/h4>\n\n\n\n<p>Now, your <code>\/dashboard<\/code> route is protected and only accessible to authenticated users.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>e. Handling Logout<\/strong><\/h4>\n\n\n\n<p>Add a logout function to clear the token and reset the authentication state:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">const handleLogout = () =&gt; {\n  localStorage.removeItem('authToken');\n  setIsAuth(false);\n};\n<\/code><\/pre>\n\n\n\n<p>Include this function in your dashboard or any other component where you need a logout option.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. Enhancing the Authentication Flow<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Persistent Authentication:<\/strong> On app load, check if a token exists in <code>localStorage<\/code> and validate it to persist authentication across sessions.<\/li>\n\n\n\n<li><strong>Role-Based Access Control:<\/strong> If your app has different user roles, implement additional logic to restrict access based on roles.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h3>\n\n\n\n<p>Implementing authentication in React.js involves managing user state, protecting routes, and ensuring secure communication with your backend. With the basic setup described above, you can expand and customize your authentication flow to meet your application\u2019s specific needs.<\/p>\n\n\n\n<p>Whether you&#8217;re building a simple web app or a complex system, understanding how to implement and manage authentication in React.js is a crucial skill that ensures your app remains secure and user-friendly.<\/p>\n\n\n\n<p><a href=\"https:\/\/codeflarelimited.com\/blog\/graphql-and-javascript-apis\/\">GraphQL and JavaScript: A powerful combination for modern APIs<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Authentication is a critical aspect of any web application, as it ensures that only authorized users can access<\/p>\n","protected":false},"author":3,"featured_media":2351,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[98],"tags":[99],"class_list":["post-2347","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-softare-development","tag-software-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Authentication in React.js<\/title>\n<meta name=\"description\" content=\"Learn how to implement authentication in React.js with a step-by-step guide to token-based authentication and protected routes.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Authentication in React.js\" \/>\n<meta property=\"og:description\" content=\"Learn how to implement authentication in React.js with a step-by-step guide to token-based authentication and protected routes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-08-16T11:55:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-16T15:11:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240816-WA0027.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1120\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kene Samuel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/\"},\"author\":{\"name\":\"Kene Samuel\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/c501609bab46c16807eb32106074f206\"},\"headline\":\"How to Implement Authentication in React.js\",\"datePublished\":\"2024-08-16T11:55:50+00:00\",\"dateModified\":\"2024-08-16T15:11:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/\"},\"wordCount\":438,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/IMG-20240816-WA0027.jpg\",\"keywords\":[\"software development\"],\"articleSection\":[\"softare development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/\",\"name\":\"Authentication in React.js\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/IMG-20240816-WA0027.jpg\",\"datePublished\":\"2024-08-16T11:55:50+00:00\",\"dateModified\":\"2024-08-16T15:11:30+00:00\",\"description\":\"Learn how to implement authentication in React.js with a step-by-step guide to token-based authentication and protected routes.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/#primaryimage\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/IMG-20240816-WA0027.jpg\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/IMG-20240816-WA0027.jpg\",\"width\":1120,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/authentication-in-react-js\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"softare development\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/softare-development\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Implement Authentication in React.js\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"name\":\"\",\"description\":\"Sustainable solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\",\"name\":\"Codeflare Limited\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"width\":1040,\"height\":263,\"caption\":\"Codeflare Limited\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/c501609bab46c16807eb32106074f206\",\"name\":\"Kene Samuel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"caption\":\"Kene Samuel\"},\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/author\\\/kene\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Authentication in React.js","description":"Learn how to implement authentication in React.js with a step-by-step guide to token-based authentication and protected routes.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/","og_locale":"en_US","og_type":"article","og_title":"Authentication in React.js","og_description":"Learn how to implement authentication in React.js with a step-by-step guide to token-based authentication and protected routes.","og_url":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/","article_published_time":"2024-08-16T11:55:50+00:00","article_modified_time":"2024-08-16T15:11:30+00:00","og_image":[{"width":1120,"height":630,"url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240816-WA0027.jpg","type":"image\/jpeg"}],"author":"Kene Samuel","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/#article","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/"},"author":{"name":"Kene Samuel","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/c501609bab46c16807eb32106074f206"},"headline":"How to Implement Authentication in React.js","datePublished":"2024-08-16T11:55:50+00:00","dateModified":"2024-08-16T15:11:30+00:00","mainEntityOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/"},"wordCount":438,"commentCount":0,"publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240816-WA0027.jpg","keywords":["software development"],"articleSection":["softare development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/","url":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/","name":"Authentication in React.js","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/#primaryimage"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240816-WA0027.jpg","datePublished":"2024-08-16T11:55:50+00:00","dateModified":"2024-08-16T15:11:30+00:00","description":"Learn how to implement authentication in React.js with a step-by-step guide to token-based authentication and protected routes.","breadcrumb":{"@id":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/#primaryimage","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240816-WA0027.jpg","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240816-WA0027.jpg","width":1120,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/codeflarelimited.com\/blog\/authentication-in-react-js\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codeflarelimited.com\/blog\/"},{"@type":"ListItem","position":2,"name":"softare development","item":"https:\/\/codeflarelimited.com\/blog\/softare-development\/"},{"@type":"ListItem","position":3,"name":"How to Implement Authentication in React.js"}]},{"@type":"WebSite","@id":"https:\/\/codeflarelimited.com\/blog\/#website","url":"https:\/\/codeflarelimited.com\/blog\/","name":"","description":"Sustainable solutions","publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeflarelimited.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codeflarelimited.com\/blog\/#organization","name":"Codeflare Limited","url":"https:\/\/codeflarelimited.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","width":1040,"height":263,"caption":"Codeflare Limited"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/c501609bab46c16807eb32106074f206","name":"Kene Samuel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","caption":"Kene Samuel"},"url":"https:\/\/codeflarelimited.com\/blog\/author\/kene\/"}]}},"jetpack_featured_media_url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240816-WA0027.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/comments?post=2347"}],"version-history":[{"count":1,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2347\/revisions"}],"predecessor-version":[{"id":2348,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2347\/revisions\/2348"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media\/2351"}],"wp:attachment":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media?parent=2347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/categories?post=2347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/tags?post=2347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}