adobe / aem-headless-client-js

AEM Headless Client for JavaScript
Apache License 2.0
25 stars 12 forks source link

Library Uses Buffer Not Supported By the Browser #42

Closed lamontacrook closed 1 year ago

lamontacrook commented 1 year ago

The expected behavior of the library should be that it supports basic auth and encode the credentials without the intervention of workarounds in the project.

Library fails because the line in the library cannot find Buffer().

authToken = Buffer.from(`${auth[0]}:${auth[1]}`, 'utf8').toString('base64')

Reproduce by:

Running create-react-app and install this library. Then use the library with basic auth. The project will fail to run because of this error.