Hi all,
I'm wondering what the best way is to check if a user is logged in or not from within a shopify app. Would love some details on the correct approach.
{% if customer %}
// use script tag to make an AJAX call to your app
{% else %}
// use script tag to make a different AJAX call to your app
{% endif %}
Once you know a customer has logged in, can you then get their id to use with the graphQL API to look up the Customer object?
User | Count |
---|---|
12 | |
11 | |
10 | |
8 | |
7 |