Discord OAuth & Product Restriction

Hello!

First off, I apologize if this is in the wrong category.

This will be a private app, not published.
I’m looking to restrict access to certain products which will replace the quantity selector and “Add to cart” buttons with a single button that redirects the customer to discord oauth to check if the user has access to a certain role, then redirect back to the product page and remove the redirect button and add the add to cart and quantity selector back I can’t find any resources on oauth redirects, how to replace buttons with other ones dynamically like that, nor how to associate tags with users

This is exactly what I’m looking to do, but with Discord instead.

Thank you!

Update: I have figured out how to hide the add to cart and quantity buttons and replace them, but I still don’t know about the oauth redirect and associating tags with users!

That would a LockSmith app. And you can tag Discord user accounts with specific tag.

If you want to hide a product from certain customers on your Shopify store, you can use the {% if %} statement in your product-template.liquid file to check if the customer has a specific tag. If the customer has the tag, the product will be displayed. If the customer does not have the tag, the product will be hidden.