MemberStack.io

Memberstack w/ Swift Vapor/custom backend technology integration?

I’m an iOS developer by training, so I was planning on using Swift Vapor as the backend technology for a new membership site I’m considering launching. Memberstack would certainly be a great fit for my project and I understand how to complete the sign in / sign up flow for a new member and generally all of the initial setup tasks.

However, let’s say my website is extremely involved and I wouldn’t be able to achieve the desired results using a no-code tool like Webflow. In other words, I’d have to write custom front-end and back-end code. I’ve looked through the docs, but I’m not sure how I’d get the currently logged in user’s information in my backend service after the user logs in.

Simply put, let’s say Memberstack redirects the user to www.website.com/account/id122143 after a valid login, where would I need to look to get the information about the currently logged in user?

The best I can gather is I’d have to take the user ID from the URL and fetch the user info from a shared database between my backend and Memberstack that I keep up in sync through a Zapier integration or something along those lines. If that’s the correct understanding, is that a safe approach?

In most of the examples I’ve found, the currently logged in user is directly integrated with a tool like Webflow’s CMS platform, but I don’t have that option here. I’d need to know the user logged in so I could look up their information / trigger cron jobs as needed, load the relevant assets, etc.

Can someone please clarify how to identify the user post sign in / login / sign up in a custom environment that doesn’t utilize Webflow? Additionally, let’s say that my backend stack doesn’t employ JavaScript, but Swift instead, so a solution that is language agnostic would be appreciated as well.

Hey Aryaman :wave:

Welcome, and thank you for posting in the forum! :partying_face:

You are in luck! We recently released out new backend API here!