Search code examples
amazon-web-servicesamazon-cognitosquarespace

Add AWS Cognito SignIn/ SignUp Feature on Squarespace Website


We have a website hosted on Squarespace. We want to add sign-in/sign-up feature to our website using AWS Cognito.The Website supports our Mobile App that uses AWS Cognito User Pool. How can we integrate AWS Cognito in our Squarespace WebPage? What other methods might work to accomplish this?

There is no specific documentation available on Squarespace regarding third party integrations.


Solution

  • Because you can only add "client-side code" to a Squarespace site, and not server-side code, you can only integrate with third-party services if it A) it is within their rather limited and internally-curated list of extensions or B) it can be done entirely via JavaScript on the front-end.

    You can't add server-side code

    Server-side code is handled by a server, not by a browser, and includes: PHP, Ruby, Ruby on Rails, SQL

    So you'd have to integrate the service using entirely client-side code, most likely using the AWS SDK for JavaScript, if that is possible. See the client-side authentication flow section here. The "Implicit grant" section here may also be applicable.