SodaCreekDigital Posted March 18, 2021 Share Posted March 18, 2021 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
SodaCreekDigital Posted March 20, 2021 Author Share Posted March 20, 2021 @paul2009 and @kerstinmartinI hope you don't mind me reaching out to you, but do you have any insight into my question? Thank you. Sandra Link to comment
paul2009 Posted March 20, 2021 Share Posted March 20, 2021 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: 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
kerstinmartin Posted March 23, 2021 Share Posted March 23, 2021 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! ❤️ Hello, I'm Kerstin! Circle Leader and Squarespace Authorized Trainer since 2016. I am passionate about teaching all things Squarespace with a focus on the art of gentle growth and calm marketing. 🎉 New course! Host your online course on Squarespace with the new Courses feature. 👩🏼💻 Curious about my 2024 pivot? Sign up to my Studio Notes for glimpses behind the scenes. Link to comment
SodaCreekDigital Posted March 24, 2021 Author Share Posted March 24, 2021 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment