App reviews, troubleshooting, and recommendations
hello Everyone,
I am using shopify/shopify-api package in my embedded app created in laravel. here is my code of context initialization
Context::initialize(
env('SHOPIFY_API_KEY'),
env('SHOPIFY_API_SECRET_NEW'),
$scope,
env('APP_URL'),
new ShopifySessionStorage(),
env('SHOPIFY_API_VERSION'),
true);
then i call the OAuth begin function from my landing-page route which is "/". here is the code :
$redirect_uri = '/auth-callback';
$isOnline = false;
$redirectURl = OAuth::begin(
$shop,
$redirect_uri,
$isOnline,
['App\Lib\CookieHandler', 'saveShopifyCookie']
);
here is the code of saveShopifyCookie function:
public static function saveShopifyCookie(OAuthCookie $cookie)
{
setcookie($cookie->getName(),$cookie->getValue(),60,'/');
return true;
}
in auth-callback url route i called OAuth::callback function and pass cookie as first argument and request query as second argument
$session = OAuth::callback(
$cookie_value,
$request->query(),
);
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025