Need to authentice chome extension user via api + Webflow or Memberstack. Tips?

I will have a paid chrome extension subscription through memberstack and when a user opens my extension after some time I will redirect to log in at my website. I have not looked at all the docs yet so do not know what the limitations are, but I need to do a check on the current logged in user and return their current membership status, and maybe some kind of token, I really don’t know. I don’t use a lot of extensions and the only one that I can recall that behaves basically how I want to auth is NordVPN, if that matters or helps at all.

I am new to full stack development just by building things for my own project, but I am hardly an expert, and almost everything I know is because I learned it to solve some problem. So I am still learning the capabilities of tokens/cookies and how they can be used here (hopefully).

If anyone has any suggestions or even just a general direction that I can go in and research myself, that would be very helpful.

Thank you

1 Like

I talked with Nicolas on the Memberstack team and he says:

You can use the DOM package or (react if your chrome extension is in react) to manage members. I’d recommend not using the Webflow package (even if you have a Webflow site)
You can use the same App ID/public key to initialize the DOM package in a chrome extension environment.

By calling the getCurrentMember() method, you can check for the presence of a logged-in user and by calling getToken(), you can grab the logged-in members access/JWT token. Checking for the presence of a logged-in member should be sufficient enough. The access token is only useful if you want to send it to a backend and verify it for authentication/authorization purposes

Let us know if you’d like more info on this or needs further clarification.

Nicolas says he’s helped another member of our team to get Memberstack working in a chrome extension environment so it is possible.