App reviews, troubleshooting, and recommendations
@Shopify
Hello Guys,
I want to open Shopify app inside the Shopify and i have applied the code on the session token as well. My Query is if the third-party cookie disabled on the browsers then also the Shopify app must be open inside Shopify?
I mean, suppose the Safari and Chrome both have disabled third-party cookies then also app embedded inside Shopify? please check session token code listed below.
Please share your thoughts on the same.
var shopUrl = "<?=$shopData->shop_url?>";
var AppBridge = window['app-bridge'];
var appBrdigeUtils = window['app-bridge-utils'];
var getSessionToken = appBrdigeUtils.getSessionToken;
var createApp = AppBridge.default;
var app = createApp({
apiKey: '{{env("SHOPIFY_APIKEY")}}',
host: '<?=$shopData->shopify_host?>',
//forceRedirect: true,
});
document.addEventListener("DOMContentLoaded", async function () {
// Wait for a session token before trying to load an authenticated page
await retrieveToken(window.app);
// Keep retrieving a session token periodically
keepRetrievingToken(window.app);
async function retrieveToken(app) {
window.sessionToken = await getSessionToken(app);
console.log(window.sessionToken)
$.ajaxSetup({
headers: {
'Authorization': "Bearer " + window.sessionToken
}
});
}
function keepRetrievingToken(app) {
setInterval(function () {
retrieveToken(app);
}, 10000);
}
});
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025