How to authenticate frontend requests from embedded node app

anthonyfierro
New Member
1 0 0

hey, i have an embedded shopify cli node app (https://shopify.dev/apps/getting-started/create), and am trying to make requests from the react frontend to custom routes on the server ive created. ive tried including the 'X-Shopify-Access-Token' and 'Authorization' headers with the correct access token from app-bridge-utils 'getSessionToken()' but receive a 302 redirect with some html that appears to be attempting to authenticate, but im expecting a json response. using axios for the requests

in the network call, i see the following response header: location: /auth?shop=undefined, and my route is never being triggered on the server

any help would be much appreciated! 

0 Likes