{"id":2887,"date":"2024-10-03T21:31:52","date_gmt":"2024-10-03T19:31:52","guid":{"rendered":"http:\/\/agilno.local\/?p=2887"},"modified":"2024-11-12T18:56:00","modified_gmt":"2024-11-12T17:56:00","slug":"customizing-nextauth-for-advanced-project-needs-lessons-learned","status":"publish","type":"post","link":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/","title":{"rendered":"Customizing NextAuth for Advanced Project Needs: Lessons Learned"},"content":{"rendered":"<p>At Agilno, we often encounter complex project requirements that demand deep customization of popular libraries. One of these challenges involved using NextAuth, a robust authentication solution for Next.js, and adapting it to meet more specific, business-critical needs.<\/p>\n<p>NextAuth works out of the box for many use cases, but it sometimes lacks flexibility when handling more advanced use cases. We faced this exact situation when implementing custom authentication flows and enriching session tokens. In this article, we\u2019ll share what we learned, the challenges we overcame, and the steps we took to extend NextAuth\u2019s functionality.<\/p>\n<h2>The Challenge: Beyond the Basics<\/h2>\n<p>We started with a project that relied on magic email tokens for authentication. This simplified the login process by removing passwords altogether, but it also presented a unique set of challenges. NextAuth, while powerful, didn\u2019t fully support this flow out of the box.<\/p>\n<p>We discovered that:<\/p>\n<ul>\n<li>Magic email tokens are not part of NextAuth\u2019s standard provider setup.<\/li>\n<li>Managing complex user roles and groups was essential for our frontend, but the default session tokens were too minimal.<\/li>\n<li>We needed to securely manage access and refresh tokens for token-based authentication.<\/li>\n<\/ul>\n<p>Our experience taught us that, while NextAuth can handle standard OAuth flows or credentials-based login, it requires customization to handle token-based, passwordless authentication and more complex role management.<\/p>\n<h2>Customizing NextAuth for Magic Email Tokens<\/h2>\n<p>Magic email tokens allow users to log in via a one-time link sent to their email. This is simpler for users, but implementing it requires careful customization. The biggest lesson here was understanding how to leverage NextAuth\u2019s credentials provider to handle a non-standard flow.<\/p>\n<p>What We Learned:<\/p>\n<ul>\n<li><strong>Customization is Key<\/strong>: NextAuth is highly extendable, and we used a custom credentials provider to intercept the authentication process.<\/li>\n<li><strong>API Communication<\/strong>: We had to send the email to our backend, which generated the token and sent it to the user\u2019s email. This separation of concerns kept our authentication logic secure and scalable.<\/li>\n<\/ul>\n<p>Code Example:<br \/>\nHere\u2019s a snippet of how we implemented the custom credentials provider:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">```javascript\r\n\/\/ pages\/api\/auth\/[...nextauth].js\r\n\r\nimport NextAuth from 'next-auth';\r\nimport Providers from 'next-auth\/providers';\r\nimport { sendMagicLink } from '..\/..\/..\/lib\/auth'; \/\/ Custom method to handle magic link\r\n\r\nexport default NextAuth({\r\n  providers: [\r\n    Providers.Credentials({\r\n      name: 'Email Login',\r\n      credentials: {\r\n        email: { label: \"Email\", type: \"email\", placeholder: \"your-email@example.com\" },\r\n      },\r\n      async authorize(credentials) {\r\n        const response = await sendMagicLink(credentials.email);\r\n        if (response &amp;&amp; response.success) {\r\n          return { email: credentials.email };\r\n        } else {\r\n          throw new Error('Invalid email or unable to send token');\r\n        }\r\n      }\r\n    })\r\n  ],\r\n  pages: {\r\n    signIn: '\/auth\/signin',\r\n  },\r\n  secret: process.env.NEXTAUTH_SECRET,\r\n});\r\n```\r\n<\/pre>\n<p>This worked because we could bypass the need for traditional credentials (e.g., username\/password) and focus purely on email-based authentication. We discovered that while NextAuth\u2019s credentials provider was designed for more traditional login forms, with a little modification, it became a perfect fit for magic email tokens.<\/p>\n<h2>Enriching Session Tokens for Complex Frontend Logic<\/h2>\n<p>In many applications, roles and permissions are central to managing user experience. However, the default JWT session tokens generated by NextAuth were too limited for our needs. We required additional information, such as:<\/p>\n<ul>\n<li>User roles (e.g., admin, client, team member)<\/li>\n<li>Groups or permissions the user belonged to<\/li>\n<li>Access and refresh tokens returned from the backend<\/li>\n<\/ul>\n<p>The Hurdles We Faced:<\/p>\n<ul>\n<li><strong>Role Management<\/strong>: The default session token contained very little information. For example, we needed to manage permissions dynamically based on the user\u2019s role (e.g., admin vs. client).<\/li>\n<li><strong>Token Expiry<\/strong>: Access tokens have a limited lifespan, so refreshing them securely without requiring a user to log back in was crucial.<\/li>\n<\/ul>\n<p>Our Solution:<br \/>\nWe extended the JWT and session callbacks to include these properties. One critical lesson here was ensuring that the access token and refresh token returned by the backend were available in the session so that the frontend could seamlessly handle token refresh logic.<\/p>\n<p>Code Example:<br \/>\nHere\u2019s how we enriched the session tokens:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">```javascript\r\n\/\/ pages\/api\/auth\/[...nextauth].js\r\n\r\nimport NextAuth from 'next-auth';\r\nimport Providers from 'next-auth\/providers';\r\n\r\nexport default NextAuth({\r\n  providers: [\r\n    \/\/ Define your providers (e.g., Credentials, Google, etc.)\r\n  ],\r\n  callbacks: {\r\n    async jwt(token, user, account) {\r\n      if (account &amp;&amp; user) {\r\n        token.accessToken = account.accessToken;\r\n        token.refreshToken = account.refreshToken;\r\n        token.role = user.role;\r\n        token.group = user.group;\r\n        token.isAdmin = user.isAdmin;\r\n      }\r\n      return token;\r\n    },\r\n\r\n    async session(session, token) {\r\n      session.accessToken = token.accessToken;\r\n      session.refreshToken = token.refreshToken;\r\n      session.user.role = token.role;\r\n      session.user.group = token.group;\r\n      session.user.isAdmin = token.isAdmin;\r\n      return session;\r\n    },\r\n  },\r\n  secret: process.env.NEXTAUTH_SECRET,\r\n});\r\n```<\/pre>\n<p>This worked well because we could now pass detailed user information and token data to the frontend. This was particularly important for handling role-based UI rendering and token refresh without disrupting the user experience.<\/p>\n<h2>What You Should Know<\/h2>\n<p>Here are some key takeaways from our experience customizing NextAuth:<\/p>\n<ul>\n<li><strong>NextAuth Is Highly Flexible, But Needs Customization<\/strong>: If your project involves more than simple login flows, you\u2019ll need to extend NextAuth to suit your needs.<\/li>\n<li><strong>Magic Email Tokens Require Custom Providers<\/strong>: While not supported out of the box, magic tokens are possible with the right setup.<\/li>\n<li><strong>Token Management Is Critical<\/strong>: Securely managing access and refresh tokens is essential for user authentication that scales.<\/li>\n<\/ul>\n<h2>Summary<\/h2>\n<p>Customizing NextAuth gave us the flexibility to implement complex authentication flows while ensuring secure and seamless user management. By leveraging custom providers and enriching session tokens, we optimized our application\u2019s authentication logic and improved the user experience.<\/p>\n<p>If your project has advanced authentication requirements, NextAuth\u2019s flexibility will allow you to implement them, but don\u2019t expect everything to work out of the box. With the right tweaks and adjustments, you can build scalable, secure solutions tailored to your specific needs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At Agilno, we often encounter complex project requirements that demand deep customization of popular libraries. One of these challenges involved<\/p>\n","protected":false},"author":16,"featured_media":2917,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-2887","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-frontend-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Customizing NextAuth for Advanced Project Needs: Lessons Learned - Agilno<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Customizing NextAuth for Advanced Project Needs: Lessons Learned - Agilno\" \/>\n<meta property=\"og:description\" content=\"At Agilno, we often encounter complex project requirements that demand deep customization of popular libraries. One of these challenges involved\" \/>\n<meta property=\"og:url\" content=\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/\" \/>\n<meta property=\"og:site_name\" content=\"Agilno\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-03T19:31:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-12T17:56:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/makeit.com.hr\/agilno\/wp-content\/uploads\/2024\/10\/kristijan-kresic-1-1024x616.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"616\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Marija\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Marija\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/\"},\"author\":{\"name\":\"Marija\",\"@id\":\"https:\/\/makeit.com.hr\/agilno\/#\/schema\/person\/974127270f2ed3dd1687a8077493d715\"},\"headline\":\"Customizing NextAuth for Advanced Project Needs: Lessons Learned\",\"datePublished\":\"2024-10-03T19:31:52+00:00\",\"dateModified\":\"2024-11-12T17:56:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/\"},\"wordCount\":765,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/makeit.com.hr\/agilno\/wp-content\/uploads\/2024\/10\/kristijan-kresic-1.jpg\",\"articleSection\":[\"Frontend Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/\",\"url\":\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/\",\"name\":\"Customizing NextAuth for Advanced Project Needs: Lessons Learned - Agilno\",\"isPartOf\":{\"@id\":\"https:\/\/makeit.com.hr\/agilno\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/makeit.com.hr\/agilno\/wp-content\/uploads\/2024\/10\/kristijan-kresic-1.jpg\",\"datePublished\":\"2024-10-03T19:31:52+00:00\",\"dateModified\":\"2024-11-12T17:56:00+00:00\",\"author\":{\"@id\":\"https:\/\/makeit.com.hr\/agilno\/#\/schema\/person\/974127270f2ed3dd1687a8077493d715\"},\"breadcrumb\":{\"@id\":\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#primaryimage\",\"url\":\"https:\/\/makeit.com.hr\/agilno\/wp-content\/uploads\/2024\/10\/kristijan-kresic-1.jpg\",\"contentUrl\":\"https:\/\/makeit.com.hr\/agilno\/wp-content\/uploads\/2024\/10\/kristijan-kresic-1.jpg\",\"width\":2560,\"height\":1540,\"caption\":\"Customizing NextAuth\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/makeit.com.hr\/agilno\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Customizing NextAuth for Advanced Project Needs: Lessons Learned\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/makeit.com.hr\/agilno\/#website\",\"url\":\"https:\/\/makeit.com.hr\/agilno\/\",\"name\":\"Agilno\",\"description\":\"We build experiences, products, and businesses that create results\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/makeit.com.hr\/agilno\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/makeit.com.hr\/agilno\/#\/schema\/person\/974127270f2ed3dd1687a8077493d715\",\"name\":\"Marija\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/cb138071e84e3a8e95a4b9e008f46076f9b525fc4df1cbaff6eb2c0d2b36cf80?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cb138071e84e3a8e95a4b9e008f46076f9b525fc4df1cbaff6eb2c0d2b36cf80?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cb138071e84e3a8e95a4b9e008f46076f9b525fc4df1cbaff6eb2c0d2b36cf80?s=96&d=mm&r=g\",\"caption\":\"Marija\"},\"url\":\"https:\/\/makeit.com.hr\/agilno\/author\/marija\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Customizing NextAuth for Advanced Project Needs: Lessons Learned - Agilno","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:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/","og_locale":"en_US","og_type":"article","og_title":"Customizing NextAuth for Advanced Project Needs: Lessons Learned - Agilno","og_description":"At Agilno, we often encounter complex project requirements that demand deep customization of popular libraries. One of these challenges involved","og_url":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/","og_site_name":"Agilno","article_published_time":"2024-10-03T19:31:52+00:00","article_modified_time":"2024-11-12T17:56:00+00:00","og_image":[{"width":1024,"height":616,"url":"https:\/\/makeit.com.hr\/agilno\/wp-content\/uploads\/2024\/10\/kristijan-kresic-1-1024x616.jpg","type":"image\/jpeg"}],"author":"Marija","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Marija","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#article","isPartOf":{"@id":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/"},"author":{"name":"Marija","@id":"https:\/\/makeit.com.hr\/agilno\/#\/schema\/person\/974127270f2ed3dd1687a8077493d715"},"headline":"Customizing NextAuth for Advanced Project Needs: Lessons Learned","datePublished":"2024-10-03T19:31:52+00:00","dateModified":"2024-11-12T17:56:00+00:00","mainEntityOfPage":{"@id":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/"},"wordCount":765,"commentCount":0,"image":{"@id":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#primaryimage"},"thumbnailUrl":"https:\/\/makeit.com.hr\/agilno\/wp-content\/uploads\/2024\/10\/kristijan-kresic-1.jpg","articleSection":["Frontend Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/","url":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/","name":"Customizing NextAuth for Advanced Project Needs: Lessons Learned - Agilno","isPartOf":{"@id":"https:\/\/makeit.com.hr\/agilno\/#website"},"primaryImageOfPage":{"@id":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#primaryimage"},"image":{"@id":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#primaryimage"},"thumbnailUrl":"https:\/\/makeit.com.hr\/agilno\/wp-content\/uploads\/2024\/10\/kristijan-kresic-1.jpg","datePublished":"2024-10-03T19:31:52+00:00","dateModified":"2024-11-12T17:56:00+00:00","author":{"@id":"https:\/\/makeit.com.hr\/agilno\/#\/schema\/person\/974127270f2ed3dd1687a8077493d715"},"breadcrumb":{"@id":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#primaryimage","url":"https:\/\/makeit.com.hr\/agilno\/wp-content\/uploads\/2024\/10\/kristijan-kresic-1.jpg","contentUrl":"https:\/\/makeit.com.hr\/agilno\/wp-content\/uploads\/2024\/10\/kristijan-kresic-1.jpg","width":2560,"height":1540,"caption":"Customizing NextAuth"},{"@type":"BreadcrumbList","@id":"https:\/\/makeit.com.hr\/agilno\/blog\/customizing-nextauth-for-advanced-project-needs-lessons-learned\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/makeit.com.hr\/agilno\/"},{"@type":"ListItem","position":2,"name":"Customizing NextAuth for Advanced Project Needs: Lessons Learned"}]},{"@type":"WebSite","@id":"https:\/\/makeit.com.hr\/agilno\/#website","url":"https:\/\/makeit.com.hr\/agilno\/","name":"Agilno","description":"We build experiences, products, and businesses that create results","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/makeit.com.hr\/agilno\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/makeit.com.hr\/agilno\/#\/schema\/person\/974127270f2ed3dd1687a8077493d715","name":"Marija","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cb138071e84e3a8e95a4b9e008f46076f9b525fc4df1cbaff6eb2c0d2b36cf80?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cb138071e84e3a8e95a4b9e008f46076f9b525fc4df1cbaff6eb2c0d2b36cf80?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cb138071e84e3a8e95a4b9e008f46076f9b525fc4df1cbaff6eb2c0d2b36cf80?s=96&d=mm&r=g","caption":"Marija"},"url":"https:\/\/makeit.com.hr\/agilno\/author\/marija\/"}]}},"_links":{"self":[{"href":"https:\/\/makeit.com.hr\/agilno\/wp-json\/wp\/v2\/posts\/2887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/makeit.com.hr\/agilno\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/makeit.com.hr\/agilno\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/makeit.com.hr\/agilno\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/makeit.com.hr\/agilno\/wp-json\/wp\/v2\/comments?post=2887"}],"version-history":[{"count":4,"href":"https:\/\/makeit.com.hr\/agilno\/wp-json\/wp\/v2\/posts\/2887\/revisions"}],"predecessor-version":[{"id":3101,"href":"https:\/\/makeit.com.hr\/agilno\/wp-json\/wp\/v2\/posts\/2887\/revisions\/3101"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/makeit.com.hr\/agilno\/wp-json\/wp\/v2\/media\/2917"}],"wp:attachment":[{"href":"https:\/\/makeit.com.hr\/agilno\/wp-json\/wp\/v2\/media?parent=2887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/makeit.com.hr\/agilno\/wp-json\/wp\/v2\/categories?post=2887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/makeit.com.hr\/agilno\/wp-json\/wp\/v2\/tags?post=2887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}