How to check whether the merchant is using the old classic user or the new one-time code user type using liquid?
Topic summary
A developer is seeking a method to determine whether a Shopify merchant is using the classic customer accounts or the new one-time code (liquid) user type.
Proposed Workaround:
- Check if
routes.account_login_urlcontains “shopify.com” - If true: Classic Login
- If false: One-Time Code Login
Open Question:
The developer asks if there is an official, documented way to perform this check, as the current solution appears to be a workaround rather than a standard approach.
One work around we found is:
{% assign login_url = routes.account_login_url %}
{% if login_url contains “shopify.com” %}
One-Time Code Login
{% else %}
Classic Login
{% endif %}
Is there any official document way?