Jump to content

Password protection and unique passwords

Recommended Posts

Site URL: http://www.libertyestates.co.uk

SOS!

I don't want my site available to the general public so would like some code that allows each user to use a unique code to access it. I also need to see which unique passwords have logged in/been used. Can someone tell me if that's possible? It's password protected currently but as far as I can see Squarespace only allows one password so I need to share that with multiple potential clients.

Link to comment
  • Replies 4
  • Created
  • Last Reply

You can add a single site password, or a single password per page, but you cannot currently use one password per user - at least not on the Squarespace 7.0 or 7.1 platform.

There are third party products available that you can use to manage access to non-sensitive information. If you search for Squarespace and Membership you'll find a number of threads about this, for example:

 

About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.
If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too.

Link to comment
8 minutes ago, paul2009 said:

You can add a single site password, or a single password per page, but you cannot currently use one password per user - at least not on the Squarespace 7.0 or 7.1 platform.

There are third party products available that you can use to manage access to non-sensitive information. If you search for Squarespace and Membership you'll find a number of threads about this, for example:

 

Thank you Paul, appreciate the help.

Link to comment
  • 2 weeks later...

(As paul2009 said below, this does not have any real password protection - I was just using it for very simple reasons that did not require real security)

I was trying to achieve a similar feature with my website and I just figured it out. I have two set passwords ("firstpw" and "secondpw"). My first password redirects to the "events" page of my website "www.mywebsite.com/events" and my second password redirects to a different events page of my website "www.mywebsite.com/all-events". 

I created a blank page and entered this in my code injection:

 

<script type="text/javascript">
var password1 = "firstpw";
var password1a = " firstpw";
var password2 = "secondpw";
var password2a = " secondpw";
var x = prompt("Please enter your password "," ");
if (x == password1 || x == password1a) {
  window.location = "events";
}
else if (x == password2 || x == password2a) {
  window.location = "all-events";
}
else {
  alert("Incorrect Password. Please refresh this webpage and try again.");
}
</script>

 

I know that you're trying to achieve unique codes for every single individual, but I thought this information might still be useful for anyone searching for a similar feature.

Link to comment
23 minutes ago, pv2020 said:

I was trying to achieve a similar feature with my website and I just figured it out. I have two set passwords ("firstpw" and "secondpw"). My first password redirects to the "events" page of my website "www.mywebsite.com/events" and my second password redirects to a different events page of my website "www.mywebsite.com/all-events". 

Please be aware that the code above does not provide password protection.

I don't recommend that you use this (or any code added through Code Injection) on a live webpage. It does not provide any privacy or password protection. The problem with front-end code is that anyone can view the code, note down the passwords and then use them to access the pages. The only effective password solution is one that is provided by back-end code (code that visitors cannot see). On Squarespace, this means that Squarespace must have written the securing code you cannot add it yourself.

About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.
If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.