diff --git a/README.md b/README.md
index d2f6ddc16..ae0c355fb 100644
--- a/README.md
+++ b/README.md
@@ -77,7 +77,13 @@ You can use this comprehensive [integration guide](http://vercel.com/docs/integr
## Shopify Customer Accounts
-This fork is designed to provide a basic implementation of [Shopify's new Customer Accounts API](), which will allow a customer to login into their Next.js Shopify Website to update information and view orders. It uses the concepts of Next.js middleware and server actions to implement the Shopify Customer Accounts API Integration. All the new code for the Customer Accounts API is included in: lib/shopify/customer folder, middleware
+to do: env settings file
+update Shopify stuff so points here
+instructions
+
+This fork is designed to provide a basic implementation of [Shopify's new Customer Accounts API](https://shopify.dev/docs/api/customer), which will allow a customer to login into their Next.js Shopify Website to update information and view orders, see Shopify's [launch announcement](https://www.shopify.com/partners/blog/introducing-customer-account-api-for-headless-stores) to learn more.
+
+It uses the concepts of Next.js middleware and server actions to implement the Shopify Customer Accounts API Integration. All the new code for the Customer Accounts API is included in: lib/shopify/customer folder, middleware
The code for this repo is adapted for Next.js from code provided by Shopify
@@ -86,9 +92,7 @@ To Set This Up, please follow:
1. icons/client components
2. Get
3. Set up URLs
-4.
-
-to do: env settings file
+4. Add the following ENV variables to your .env (and Vercel dashboard)
https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/hydrogen
https://shopify.dev/docs/api/customer
diff --git a/components/auth/login-form.tsx b/components/auth/login-form.tsx
index 845c036e8..3410b0e84 100644
--- a/components/auth/login-form.tsx
+++ b/components/auth/login-form.tsx
@@ -1,8 +1,6 @@
'use client';
-import { UserIcon as LogInIcon } from '@heroicons/react/24/outline';
import clsx from 'clsx';
import { doLogin } from './actions';
-import LoadingDots from 'components/loading-dots';
import { useFormState, useFormStatus } from 'react-dom';
function SubmitButton(props: any) {
@@ -27,12 +25,10 @@ function SubmitButton(props: any) {
>
{pending ? (
<>
-
- Logging In
+ Logging In...
>
) : (
<>
-
Log-In
>
)}
diff --git a/components/cart/index.tsx b/components/cart/index.tsx
index 3e250ba93..14d6a04c8 100644
--- a/components/cart/index.tsx
+++ b/components/cart/index.tsx
@@ -8,6 +8,14 @@ export default async function Cart() {
if (cartId) {
cart = await getCart(cartId);
+ //pass logged_in true to shopify checout to utilize customer api
+ //see: https://shopify.dev/docs/api/customer#step-stay-authenticated-on-checkout
+ const newCheckoutUrl = new URL(cart?.checkoutUrl || '');
+ newCheckoutUrl.searchParams.append('logged_in', 'true');
+ cart = {
+ ...cart,
+ checkoutUrl: newCheckoutUrl.toString()
+ };
}
return ;