MemberStack.io

Can I use Memberstack within custom websites and apps?

Hi there,

I’m a software engineer maintaining a micro-services architecture. We have some services that I am considering building with a CMS like Webflow, and would like to use Memberstack alongside Webflow. However, I will need to use the same user credentials across the application stack, for custom-built websites as well as our CMS-generated pages.

Two questions:

  1. Can I programmatically add users to Memberstack via a Memberstack maintained Write API?
  2. If yes, can I use Memberstack’s plugin on custom-built (non-CMS) websites?

Thank you very much,
Melanie

1 Like

Hi Melanie!

Sorry for the delayed response here.

At the moment, I don’t think we have everything you need but hope to soon. There are many dev focused features coming down the pipeline that we are really excited about. When we have those, you should be able to do everything you outlined above very easily.

In the meantime, you can programmatically add users to Memberstack through our Zapier app and can even set passwords. And yes you can add Memberstack to custom built websites :grinning:

Hi Tyler,

Thanks for the reply! Can you point me to docs about adding memberstack to a custom-built website?

I’m quite open to the possibility of using zapier to programmatically add users, but if I’m understanding correctly I couldn’t modify them (edit or delete) in this way?

Thanks,
Melanie

Here are our docs for our custom integration :grinning:

You can update Members with Zapier, but you can’t change their password through zapier. You also cannot delete a member through zapier.

Hi Tyler,

Perhaps I am missing something, but the link does not seem to point towards docs about integrating Memberstack into a custom website. Can you please update the link?

Also, would I be able to get user auth details from a READ api? To clarify, I’d like to send a request with user email and password, and receive back from Memberstack a reply as to whether the user credentials are valid. Is this possible?

Thanks,
Melanie

Hey, Melanie! I’m not associated with the MemberStack team, but to clarify on the custom website docs: The link he shared is actually a list of documents & posts related to setting up MemberStack to work with your custom website.

If I’m not mistaken, setting up MS on a custom website will be very similar to setting it up on something like Webflow, as most of what you’re doing is adding a little code snippet in the site header & adding html attributes to relevant elements (e.g. sign up/login forms, places you want to display MS field data, content you want to hide, etc)

They also have some templates that are free to download here that you could tear apart to figure out how they’re set up in Webflow or HTML/CSS.

Hope this helps!

Hi Zach,

Thanks for the reply, I appreciate it! I’m currently trying to do this integration of Memberstack with my custom site built with a React/Redux frontend.

What I understand is that there are two main things to do:

  • Add the memberstack code snippet into the header of my application
  • add html attributes to my login form currently using jsx

Is this correct, or do you know if there’s anything else to do? I have tried these two things but am running into the error: “cannot POST /login”.

I’m guessing this is because I’m trying to test my site locally and Memberstack is requesting I test from a publicly accessible URL. Is this correct? Do you know if local testing is possible (e.g., localhost:3000), or can you provide a suggestion for testing otherwise?

Thanks,
Melanie

Just realized that I can deploy the development branches to my staging site to see if the site is passing the Login page tests. I’m not, it looks like the following


One thing I did think of is that React is injecting the HTML into the DOM after Memberstack scrapes the page, is this a possibility?

Here’s a snippet of my code below (used in a React component’s render method). I’ve used the HTML attributes as I saw in the login page, but maybe I did something incorrectly. Can you please let me know if there’s something wrong here?

            <form data-ms-form="login" method="post" ms-login="true">
                <label htmlFor="email">Email:</label>
                <input ms-field="email" id="email" type="email" data-ms-member="email" placeholder="Enter email" required autoFocus />
                <label htmlFor="password">Password:</label>
                <input ms-field="password" id="password" type="password" data-ms-member="password" placeholder="Enter password" required />
                <a ms-forgot="true" href="/#/ms/password-reset">Reset password.</a>
                <input type="submit" value="Submit" />
            </form>