Since switching to new Customer Accounts sytem, I can't figure out how to access the currently logged in customer in my theme.
With the old system, the customer id was accessible via {{ customer.id }} in liquid, and __st.cid in JavaScript. This no longer works when using the new Customer Accounts.
What's the best way to access the customer id in a theme with the new system?
See also here: https://community.shopify.com/c/shopify-functions/issue-with-new-customer-accounts-login/m-p/2785423
Expected: {{ customer.id }} and __st.cid return the id of the currently logged in customer, or null of not logged in.
Actual: Both values are undefined when using the new Customer Accounts system
theme.liquidand in a custom snippet file as shown in the screen recording in the link that you have shared. In both the places I'm getting the customer data. Perhaps you are doing something wrong? Try switching the theme.