mhart / aws4

Signs and prepares Node.js requests using AWS Signature Version 4
MIT License
703 stars 176 forks source link

AWS4 package issues with React Application #154

Open prateek1406 opened 1 year ago

prateek1406 commented 1 year ago

Hi, I need to generate a signed request to hit an API Gateway(secured with IAM). I need to implement this in a React application, so I am using aws4 to sign the request. But the React Application is giving me errors due to webpack issues like Webpack >5, which needs polyfill. I am trying to resolve them by writing a fallback in node_modules/react_scripts/config/webpack.config.js for crypto, stream etc. But still not working. One fix I got from Stackoverflow: 1) Downgrade the react-scripts version from 5.0.0 to 4.0.3 but in that there are many package vulnerabilities. Please suggest how to use aws4 in React^18 and react-scripts^5.0.0