We have a large Shopify site and we are getting ready to launch our Discourse community. We want to make it so that only members of our Shopify site (e.g. customers that have created a login on our store), can access our community.
So if on foo.com my login is trey@mail.com / password, those are the credentials I would use on Discourse. Gotta have a foo.com login to access the Discourse!
You can use Discoursify app for Shopify for that. DiscourseConnect option seems to be what you need: the login / signup of your Discourse community will be replaced with Shopify built-in authorization/registration system. Users will only need to sign up / log in once (to Shopify), Discourse will automatically get user’s state from the connected Shopify store. Plus, this way of setting up things is easy, you will find instructions in the app’s admin.
It configures a Shopify store to be an OAuth2 identity provider. On the Discourse end, you’d need to configure the OAuth2 Basic plugin with the credentials provided by the Shopify app. It’s a fairly expensive app ($2,689/year for 2500 unique users.)
If you’re sure that you only want users to be able to login to your Discourse site via Shopify, a Shopify app that used DiscourseConnect instead of OAuth2 might be the way to go. The limitation with DiscourseConnect is that when it’s enabled it becomes the only available login method for the Discourse site, so you couldn’t have some users login via DiscourseConnect and other users login with a username/password.