LogoLogo
Build appsContact API support
  • Build apps
  • Site Templates
  • API Reference
  • Changelog
  • Ecwid API Changelog
  • May 2025
    • May 16
  • April 2025
    • April 25
    • April 11
  • March 2025
    • March 28
    • March 25
    • March 20
    • March 17

Lightspeed® 2025

On this page

Was this helpful?

  1. March 2025
  2. March 20

SHA1 replaced with SHA512 for the Storefront SSO feature

Last updated 2 months ago

Was this helpful?

What's new

The encryption mechanism for SSO was updated from SHA1 to SHA512 for security enhancement.

Changes in API

Payload signing now uses sha512. Code example on PHP:

<?php
    $client_secret = "A1Lu7ANIhKD6A1Lu7ANIhKD6ADsaSdsa"; // example value
    $message = base64_encode("{appClientId: 'my-cool-app', userId:'234', profile: { email:'test@example.com', billingPerson: { name: 'John Doe' } }}"); // example values
    $timestamp = time();
    $hmac = hash_hmac('sha256', "$message $timestamp", $client_secret);
​
    echo "<script> var ecwid_sso_profile = '$message $hmac $timestamp'; </script>";
?>

Why the changes are breaking

The SHA1 encryption is now discontinued. If the encryption mechanism isn't updated in the code, the SSO will stop working.

How to update the app

  1. Check if your app uses SSO on the website.

  2. Check the code to find the hash_hmac() encryption.

  3. Update the 'sha1' with 'sha512' inside the hash_hmac() method.

Breaking changes! Сhanges listed below may break some apps' logic.

SSO (Single-Sign-On) for websites