Session Cookie missing at auth callback url

hello Everyone,

I am using Shopify-api-php package for my app and I use OAuth to authenticate my app. here is my code :
$redirect_url = OAuth::begin($shop,‘/auth-callback’,false,[‘App\Lib\CookieHandler’, ‘saveShopifyCookie’]);

One problem I have is that my app’s URL is https://name.ngrok.io and not {shop}.myshopify.com, despite the attribute redirect_uri domain is {shop}.myshopify.com and the end point is /auth-callback.
The saveShopifyCookie method has another problem. I tried to save a cookie using this function, but it was unsuccessful.
here is saveShopifyCookie function code:
Cookie::queue($cookie->get Name(),$cookie->get Value(),

$cookie->getExpire() ? ceil(($cookie->getExpire() - time()) / 60) : null,

‘/’);

i followed a GitHub link given below:
https://github.com/Shopify/shopify-app-template-php