{"repo":"saleor/auth-sdk","free":true,"listed":false,"github":"https://github.com/saleor/auth-sdk","clone":"git clone https://github.com/saleor/auth-sdk.git","description":null,"language":"TypeScript","stars":28,"topics":["apollo","graphql","hacktoberfest","nextjs","saleor","typescript","urql"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"Saleor Auth SDK Saleor Auth SDK integrates secure and customizable authentication and authorization into storefronts using Saleor. Below 3kB bundle size (gzipped). npm • Docs • Twitter • Discord Usage Next.js App Router The Saleor Auth SDK supports both Next.js 13/14 and Next.js 15 , but due to changes in how cookies are handled, different storage methods are required for each version. --- Using Saleor Auth SDK in Next.js 13/14 Next.js 13 and 14 support synchronous cookies , which means you can use the getNextServerCookiesStorage function without issues. Setting Up the Auth Client (Next.js 13/14) Logging in can be implemented via Server Actions: Using Saleor Auth SDK in Next.js 15 Next.js 15 introduces asynchronous cookies, requiring the use of getNextServerCookiesStorageAsync instead. Setting Up the Auth Client (Next.js 15) Logging in can be implemented via Server Actions: Then, you can use saleorAuthClient.fetchWithAuth directly for any queries and mutations. For a full working example, see the Saleor Auth SDK example. Next.js Pages Router with Apollo Client Step-by-step video tutorial Check the following step-by-step video guide on how to set this up. When using Next.js (Pages Router) along with Apollo Client, there are two essential steps to setting up your application. First, you have to surround your application's root with two providers: and . comes from our React.js-auth package, located at @saleor/auth-sdk/react , and it needs to be set up with the Saleor auth client","default_branch":null,"files":null,"tree":[],"storefront":"/r/saleor","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/saleor/auth-sdk/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}