Jump to content

Member Areas - User ID / Authentication

Recommended Posts

I'm working on a concept for a website where member areas will be used (we are in the design discussion phase so I don't have a URL to share).  The idea is for members to be able to login and view a set of pages that show data from a database that is being built using SQL Server. 

The database developer has asked what the rendered HTML is for the user details (e.g. a user ID, a user email address are the likely information).  He wants to complete a check of all users that are on the page to confirm that they are authenticated.

This is a bit over my head so wondering if anyone that is more familiar with the technicalities of Squarespace and member areas that could help me understand what the user details are that are available?  Or, can I put the developer in contact with you for him to explain this potentially better than I am! 😀

Thank you!

Link to comment
  • Replies 4
  • Views 2k
  • Created
  • Last Reply
On 3/18/2021 at 5:56 PM, SodaCreekDigital said:

I'm working on a concept for a website where member areas will be used. The idea is for members to be able to login and view a set of pages that show data from a database that is being built using SQL Server. 

The database developer has asked what the rendered HTML is for the user details (e.g. a user ID, a user email address are the likely information).  He wants to complete a check of all users that are on the page to confirm that they are authenticated.

Hi Sandra

If the SQL data is to be embedded in Squarespace pages that are protected by Member Areas then I wouldn't expect the developer to need to authenticate users too. If the customer has reached the page, they are authenticated. As far as I know, they wouldn't be able to confirm if the user is authenticated in Member Areas anyway, because as the API does not mention this capability yet.

Perhaps @KLin or@MaddieSmith can confirm whether the API has been updated to allow us to query if the customer is actively subscribed to a Member Area plan?

However, to answer your specific question 🙂 there isn't any rendered HTML because the user details are secured in a separate account frame. You could use JS to call the User Account API to check if the user is authenticated. If they are, you can return some information about the customer such as their email address, name and customer id.

-Paul

About me: I'm Paul, a SQSP user for over 18 yrs and a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji below. Buying a coffee is optional.

Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance

Link to comment
On 3/20/2021 at 2:45 AM, SodaCreekDigital said:

@paul2009 and @kerstinmartinI hope you don't mind me reaching out to you, but do you have any insight into my question?

Hi Sandra! This gets too technical for me as well, I know the user side really well but I am not a developer. It looks like @paul2009did a stellar job in answering this! ❤️

 

CalmBusinessLogoTitleSimple.png.3067db0e3c08baf2e967872eaa6f9182.png

Hi, I'm Kerstin! I offer business and marketing courses to help solopreneurs deepen their business skills and grow their confidence, audience, and revenue - without the hustle.

🎉  What kind of entrepreneur are you?  Take the quiz

Link to comment

Thank you @kerstinmartin!

@paul2009Thank you as well for your response.  Do you know of any examples where JS has been used to call the User Account API to check if the user is authenticated.  And if there are examples, can we return some information about the customer such as their email address, name and customer id?

Or, do you now of any support or knowledge documents on this?  I really appreciate your help.

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.