Session Token Check Failing During App Review (App Bridge v4)

Hi, I’m facing an issue while submitting my app for review — the check for using a session token for user authentication keeps failing.

I’m using App Bridge v4 and have already added the meta and script tags. According to the documentation, session tokens are automatically managed in the newer version of App Bridge.

Previously, when I submitted a React + Django app using App Bridge v4, I didn’t have to do anything additional for session tokens, and the review passed successfully. I’m not sure why it’s failing this time with my current Remix (frontend-only) and Django setup.

I also tried using await shopify.idToken, but as mentioned in the documentation, the shopify object is a global variable provided by App Bridge. Interestingly, it’s being recognized in my React + Django Shopify app, but not in this current Remix app. I suspect the issue might be related to App Bridge itself.

Could you please help me resolve this?

Here are some of the references I explored while investigating the issue:

I’m also attaching screenshots showing:

Note: I’ve already waited a few days in case the check refreshed automatically, but there’s been no change.

Hey @Aminah_Rashid Thanks for reaching out.

I can’t say for sure, but this is potentially a initialization error. I’m not sure if it’s App Bridge itself, but I’m happy to look into this further. Could you share a few more things with us though if possible?

First, can you open the Network tab in your Remix app and look for app-bridge.js from cdn.shopify.com? Does it show up with a 200 status or is it failing to load? Screenshot that if you can.

Second, if you’re able to, can you check your app/root.tsx file (or wherever you define your document shell, with the API key redacted)? Remix handles the document structure differently than regular React, so I need to see how you’re setting up the head section there. It should look like this:

<meta name="shopify-api-key" content="..." />
<script src="https://cdn.shopify.com/shopifycloud/app-bridge.js"></script>

And the last thing, can you share the snippet of where you’re calling shopify.idToken in your code? Is it in a component wrapped in a useEffect or similar?

A common issue is often that the script tag isn’t in the Remix root layout, or there’s a hydration timing issue where your code runs before App Bridge initializes. Let me know what you find, happy to look into this with you.

Hi @Alan_G, thank you for your suggestions. Following the Remix SPA Guide, I was able to resolve the issue of the Shopify global variable being undefined and the App Bridge script not loading. However, the second check is still failing.

Someone in the community suggested using await shopify.idToken(), but it never resolves, neither in the code nor in the browser. I am sharing some screenshots for reference:

In the code, this is how I am attempting to retrieve the shopify.idToken() but these lines never resolves

console.log("✅ Shopify ID Token:", await window.shopify.idToken())

// ✅ Get token once

const token = await window.shopify.idToken();

console.log("✅ Shopify ID Token:", token);

Image of code and browser console:

I also tried running shopify.idToken() in the console of the React-based Shopify app, but it gives the same pending result. I am unsure what else might be required to resolve the second check failure.

Any guidance would be greatly appreciated. Thank you.