import sha1 from 'sha1';

export function signature(secret, url, payload) {
  payload = payload ? JSON.stringify(payload) : '';

  return sha1(secret + url + payload);
}

import sha1 from 'sha1';

export function signature(secret, url, payload) {
  payload = payload ? sha1(JSON.stringify(payload)) : '';

  return sha1(secret + url + payload);
}

Fix signature generation for requests with payload
Fix signature generation for requests with payload

According to the [documentation](https://rokka.io/documentation/guides/authentication.html), sha1 is needed around the body as well. Double-sha ;)