-Make sure that New Customer Accounts are enabled in the Shopify Settings.
Do you have any errors?
CORS issues?
Running the site with a domain or local server?
Back when I did this with Next.js I remember making a reusable component
import { useRouter } from 'next/router';
import { useEffect } from 'react';
const RedirectComponent = () => {
const router = useRouter();
useEffect(() => {
const handleRouteChange = (url) => {
// Check if the URL contains the specific domain
if (url.includes('littlepaintingprints.myshopify.com')) {
// Redirect to the desired URL
window.location.href = 'https://littlepaintingprints.com/checkouts/
It was something like that. I need more coffee and sleep right now, sorry this is all the help I have.
Server redirects to the authorization url (shopify.com)
User enters email, and submits code from their email client
User is navigated back to mydomain.com where i exchange the code for id/access/refresh tokens.
I’m also appending logged_in=true to the checkout URL as specified in the docs. However, the login link still exists in the checkout page, and clicking it immediately authenticates the user. But, the expected behavior should not require user interaction.
Regarding CORS, I don’t think this is applicable as there are no front end AJAX calls crossing domains at play. the OAuth2 flow is all first party redirects.
In terms of other errors, not really. The checkout url (
https:////checkouts/?key=&logged_in=true) returns a 302 redirect chopping off “logged_in=true”
For me it was making sure “Login links” were enabled. Also it seemed like the ?logged_in=true didn’t make a difference; the user is authenticated at checkout with or without that.