Getting Logged User ID

I would like to create a javascript powered application that communicates with an external server. Additionally, I would like to use the webflow user/ecom system to create users.

Example: Someone who is subscribed to a paid plan can submit a request and get a response from the external server with the paywalled data. I want to verify this user in the server. Therefore, I would like get get the current ID of the user, along with a secret to be sent to the server and to a proper response.

Or send a token to the external server which I can use to verify the other end.

Is this possible?

I’ve just recently added the Webflow UserID to SA5’s User Info lib; it’s in BETA, haven’t used it in a production project yet.

This by itself is a good identifier for your external data, you’d have to figure out how to add any security you want on top of that.

I appreciate the answer and your unique way of getting that data, but I was looking for a cleaner way to do this. I am surprised at Webflows lack of ability to show user information and integrate other login authenticators. It’s all a bit messy. But I really appreciate your method and that you took the time to solve this problem!

MemberStack offers both access to user info and alternative authenticators. It’s an excellent platform.

1 Like

its ok. I do not want to use or pay for Memberstack. I want to learn how to build my own system with mongodb. And use webflow as a front-end since I love the design and interactions aspect of webflow. I am just going to create a layer above the front-end to work how I need it to work.

Ok, but from a practical standpoint it’s going to cost you a lot more to rebuild it. Certainly implementing the auth part though is a useful learning exercise.

Very true. I’m going to try and build a node.js mongodb integration, I found some good resources. Thanks Michael!