A space to discuss online store customization, theme development, and Liquid templating.
Since merchants using the New Customer Accounts is becoming more common, some have reached out with issues.
Our app leverages app proxies that contain important data such as the logged_in_customer_id.
Through this value, we determine if a customer is logged in and then perform actions based on that.
We expect this value to stay consistent/unchanged with the addition of new customer accounts. Merchants have reported that even when a customer logs in through the new customer accounts and browses the merchant's store, they are not able to access our widget as if they were logged in. A seemingly never-ending loop.
It seems that sometimes/randomly, even when logged in, the logged_in_customer_id value is empty in the app proxy payload. After experiencing this in our dev stores, we could only seem to fix it by switching to the classic accounts and then back to the new customer accounts. Sometimes we are able to replicate it, sometimes we are not. We also have noticed that after logging in and browsing the store, the URL will contain the parameter accountnumber=0. Although we have seen other values than 0 for the same customer and none seem to work/make a difference.
Note: This is for regular storefront pages. We are well aware that for the new Customer UI and Checkout/Thank You page extensions we would need to use the session token to get the customer id as the app proxy would not include the logged_in_customer_id.
Thank you.
If needed, I can PM a video of us replicating the issue. As developers, we rely on these values in Shopify to provide the correct functionality. I imagine we are not the only developers using app proxies.
Edit: Furthermore, after doing additional testing, when the customer is logged in (and the value is not empty) and then proceeds to log out, the logged_in_customer_id value persists as if they were still logged in.