To create a membership portal in Webflow using AuthPro, you'll need to connect AuthPro for user authentication and control content visibility based on login status.
1. Set Up Your Webflow Structure
- Design public and member-only pages within Webflow. For example, create a “Login” page (public) and a “Dashboard” page (restricted).
- Use consistent classes and IDs on sections you want to hide or show based on login status (e.g.,
logged-in-content
, guest-only
).
- Sign up at AuthPro.com and create a new membership project.
- Go to Control Panel > Account Settings and note your login form code, logout link, and member area settings.
- In Page Protection settings, set which Webflow URLs require login (e.g.,
/dashboard
, /profile
).
- Go to your Webflow Login page, add an Embed element, and paste your AuthPro login code.
- Make sure the form action points to your AuthPro subdomain, and the redirect URL leads to a protected page (like
/dashboard
).
4. Manage Content Visibility Based on Auth Status
- AuthPro sets a cookie on login. Use custom JavaScript inside Webflow to:
- Detect the presence of the AuthPro cookie
- Show/hide content based on whether the user is logged in
Example approach:
- Add an Embed element to your Webflow pages with JavaScript checking the cookie (e.g.,
authuser
). - Show
.logged-in-content
and hide .guest-only
when the cookie is found. - Do the reverse when the user is logged out.
If you are not comfortable writing JavaScript, you may need help from a developer or use Webflow’s custom code embedding feature inside the Footer section of your page.
5. Add a Logout Link
- AuthPro provides a logout URL (e.g.,
https://yoursite.authpro.com/logout.htm
). - Create a button or link inside Webflow and set the
href
to this logout URL.
6. Test the Whole Flow
- Visit your login page, submit the AuthPro form, and check if you're redirected to the member dashboard.
- Confirm that member-only content appears, and guest content is hidden.
- Test logging out and ensuring content visibility resets.
Summary
To integrate AuthPro with Webflow, you embed AuthPro’s login form, set page-level protection in AuthPro, detect login status via cookies using JavaScript, and show/hide content accordingly. Webflow handles your page design, while AuthPro manages user authentication.