-
-
Notifications
You must be signed in to change notification settings - Fork 377
Added read shop from referrer if everything fails #722
Conversation
when using config_api_callback sometimes shop is just null if i click on an internal url of my app, but the information is present in the referrer
Thanks! Given this situation can happen with other cases, maybe you can include support for headers too? If you look at AuthShopify.php::getData, you'll see code that grabs from input (shop query param), headers (x-shop-domain), and referrer. |
Added header support
something like this?
I haven't tested it yet, sorry little busy today |
The multiple nullcoalescing is a bit hard on the eyes. My suggestion would be to extract the shop detection into its own private function and have the function return the shop to use. |
ahahah ok
ok I'll look into it |
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added without me noticing, but isn't it needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats fine!
Ok, I've fixed automatic test errors and added also a parameter to bridge createApp function, without that config_api_callback did not work.
|
Ill review now thanks! |
@osiset Done! I still have cookie/session issues in some cases, but I manage with the ?shop= parameter for now. |
Found a breaking bug in ShopDomain::fromNative use, please @osiset wait for next UPDATE |
Sure :) |
this is shockingly dangerous 😱 |
when using config_api_callback in configuration sometimes $shop is just null if i click on an internal url of my app, but the information is present in the referrer