I need help with something specific. I created a design prototype using a tool similar to Figma or InVision, and now I want to add password protection to it. The problem is that these design tools don’t have built-in password protection features that work the way I need them to.
My current idea is to wrap the prototype link inside an iframe and use some JavaScript code to show a password prompt before users can access it. But I’m not sure if this is the best approach.
Has anyone done something like this before? Are there better methods to protect prototype links with passwords? I’m open to both JavaScript and PHP solutions. Any suggestions would be really helpful.
the iframe method’s kinda clunky imo. try making a simple HTML page that prompts for the password before redirecting to ur prototype. basic js works for client-side checks, but if you prefer something more secure, use php for validation. it’s a cleaner solution than messing with iframes.
I implemented a similar solution for securing client prototypes. While using an iframe might seem tempting, I’ve found it problematic, especially for mobile devices. Instead, I opted for a straightforward PHP authentication script that guards the prototype link. It checks for a session variable; if someone tries to access the prototype without being logged in, they are redirected to a login form. Once authenticated, the session is created, and users can access the content seamlessly. This method not only retains full functionality across devices but also enhances security since password validation is handled server-side rather than exposing it to potential client-side vulnerabilities.