Is It Possible To Use An External Database For User Data & Login Credentials With Shopify?

こ雲淡風輕ζ 提交于 2021-02-10 21:38:58

问题


Our client has asked us to build a Shopify site that ties into their in-house customer db (with or without using Salesforce). Is this even possible? Does Shopify support any method of cross-site database querying?

The only thing I can think of to accomplish this is to write a webhook on their in-house server with a simple read-only mini DB query API. However, as that I'm not super familiar with Shopify's more obscure capabilities (and having already spent quite some time sifting through their docs and running google searches on the matter with absolutely zero results), I'm not even sure if this is possible.

Are we barking up an impossible tree, or is this something that can actually be accomplished?

Thank you in advance for any help you can give.


回答1:


What I have understood from your description is you already have an external database with user login details and you want to use the same for authentication in Shopify. If yes, then it is possible with Shopify Multipass feature. This feature is only available for Shopify Plus plans. From the Shopify Multipass docs

Multipass login is for store owners who have a separate website and a Shopify store. It redirects users from the website to the Shopify store and seamlessly logs them in with the same email address they used to sign up for the original website. If no account with that email address exists yet, one is created. There is no need to synchronize any customer databases.

For your particular scenario, you would have to validate user credentials with your external database, generate multipass url and redirect.




回答2:


Yes your requirement is quite possible. But the method i am going to mention is a hack basically. Below are the steps:

  1. Create Login page/Account creation page in Shopify
  2. When the user does a login/create account you send the information to your server via below methods
    • JSONP request
    • Creating a iframe of your domain and passing the information in the iframe
  3. Now, you validate the user credentials at your server
  4. After validating you check if the user is present in Shopify. If not you create the user with a password. API Link
  5. Make sure you save the user password you push into Shopify at your end also.
  6. Now when you have completed authentication of the user, return back Shopify username and password
  7. Create a hidden form in Shopify liquid file and pass the credentials in the respective fields and submit the form and user should be able to log in with the existing password they have!


来源:https://stackoverflow.com/questions/57439319/is-it-possible-to-use-an-external-database-for-user-data-login-credentials-wit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!