openbazaar.js
function getOBAuth(config) {
  // debugger;

  // Encoding as per API Specification.
  const combinedCredential = `${config.clientId}:${config.clientSecret}`;
  // var base64Credential = window.btoa(combinedCredential);
  const base64Credential = Buffer.from(combinedCredential).toString("base64");
  const readyCredential = `Basic ${base64Credential}`;

  return readyCredential;
}
function getOBAuth(config) {
  // debugger;

  // Encoding as per API Specification.
  const combinedCredential = `${config.clientId}:${config.clientSecret}`;
  // var base64Credential = window.btoa(combinedCredential);
  const base64Credential = Buffer.from(combinedCredential).toString("base64");
  const readyCredential = `Basic ${base64Credential}`;

  return readyCredential;
}
function getOBAuth ( config ) { // debugger; // Encoding as per API Specification. const combinedCredential = ` ${ config . clientId } ${ config . clientSecret } ` ; // var base64Credential = window.btoa(combinedCredential); const base64Credential = Buffer . from ( combinedCredential ) . toString ( "base64" ) ; const readyCredential = ` ${ base64Credential } ` ; return readyCredential ; }
Generate an auth key for the header. Required fall all OpenBazaar API calls.
Generate an auth key for the header . Required fall all OpenBazaar API calls .