Can't get a session token from official node app sample

Shopify Partner
7 0 1

I'm trying to upgrade our APP to session token, and followed this video tutorials: , I'm using the latest shopify CLI to create a node app, and want to see how the session token works. I changed the sample code a little bit according to the video

function MyProvider(props) {
  const app = useAppBridge();
  // codes I added here to get token
  getSessionToken(app).then(token => {
    console.log("token:", token)
  const client = new ApolloClient({
    fetch: userLoggedInFetch(app),
    fetchOptions: {
      credentials: "include",

  const Component = props.Component;

  return (
    <ApolloProvider client={client}>
      <Component {...props} />

But it return the error below, anything is wrong? The app url is set up correctly.


Replies 0 (0)