Fetch info if a user entered a password

HI Guys,

I have a question!

Is it possible to fetch the information if a person entered a password on a secured site inside my webflow project so i get a response?

My goal is to get a response so i can for example exclude a button “register now” if you’re logged in already.

Is this possible or do i need to use other tools like firebase?

Best Regards,
Marcel

Hi @HKMK :wave: welcome

I’m not clear on this. Can you talk about exactly what secure site inside your webflow project you have setup?

Let’s say you select an Folder with Password protection inside Webflow. I want to get a callback if someone logs in with a general password so i can disable a class for example.

For Memberships, Webflow has announced they are releasing the ability to conditionally display elements based on login state.

So yes, you will be able to hide that “register now” button for logged-in users.

That feature is scheduled to drop sometime in December.

ah, i see. you can’t do anything like that with the password protection feature unfortunately. about the only thing you could do is trigger a script when someone views the page with the assumption that they’ve entered a password since they’re accessing it.

Thank you guys for your replies! :slight_smile:
How would you trigger a script to affect an other page in webflow?

Sorry not really following you. Maybe you could talk a little bit more about what you’re trying to do?

I’m trying to create a website in Webflow where certain pages are protected and can only be accessed by entering a password. Once the password is entered, hidden elements on not protected pages will be displayed. Essentially, it’s like a user login but specifically for accessing protected pages within the website. Can anyone guide me on how to set this up in Webflow?

Marcel, you’re talking about a simple, standard setup in Webflow.

  • Setup memberships
  • Create an access_group
  • Protect some pages
  • Use conditional visibility on elements on other ( non-secured ) pages on your site, to control which parts are visible to logged in v. logged out users.

No scripts needed.

the problem is, i just can’t create members from scratch. i need to invite them via e-mail right? Or is there an other way i can set up custom users with Username and Password…?

Yes, you can invite them or allow them to self-register, depending on your needs.

On Webflow, the secure, integrated solution is memberships. There are lots of other solutions, but 3rd party ones like Memberstack will add cost and aren’t quite as secure.

If you’re a developer, search the forums for Firebase authentication, you’ll find some guides on how to build that- and then you have more control over the onboarding process.

@HKMK thanks for the details.

The two best approaches I’ve used so far are native Webflow Memberships (walk-through) and an add-on that gates content with Memberstack (tutorial).

The former is new, still in beta, doesn’t have a lot of features, and is not yet reliable for prime time.

The latter is much more feature rich, more stable, but it’s an add-on solution that has disadvantages a native solution does not.

That’s not a problem, both of the solutions I mentioned do the job for you.

For Webflow Memberships there is a very recently added feature that most are not aware of.

Here’s a quick walk through showing off this new feature.

With Webflow Memberships enabled, choose any element on your canvas and go into that elements settings.

Find the visibility section:

…and now you can set that element to visible or not based upon a login.

Hope that helps!