The Multipass docs state that customer is automatically created if not found:
Is there any way to know if the customer was created by Mutlipass or Not via API?
One way I can think of is Metafields - but hope there would be an easier way.
Metafields doesn't make sense since you can not pass those over in the multipass call. If the middleware is also set up to add some customer metafields after the fact then perhaps it's an approach that could work.
Why is there a need to to know? Some context will help drive the approach so I can really only guess at this point.
There is the multipass_identifier property on the Customer object that can be sent over in the multipass call but that's not a required (but suggested) field. If you control the multipass login you can pass over that so it's there for checking later on. However, if you control the multipass login already you should know what customers are logged in this way since your system did it in the first place.
Hi Jason, thanks for the quick response!
To give some context, it's for an "unlink 3rd party feature":
In the accounts page, we show the 3rd party linked accounts (e.g. Google), and give the option to "unlink" the account.
However, the "unlink" button should be disabled when the user created their account via 3rd party auth & not through Shopify (because the user doesn't have a valid Shopify Password)
I think the correct issue is, how to know if the user has a password set in Shopify?
Given this usecase:
1. User account is created via MultiPass & metafield is added "main_login_method: google"
2. User clicks "reset password" - a password in Shopify is created in this case
3. User can then login via Username / Password fields of Shopify site (No longer only through 3rd party Auth)
In our case, we would like the "unlink" button to be available to the user - since they have set their username / password in Shopify already & can unlink 3rd party auth.