![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
shared-access-signature
Advanced tools
This package provides a simple API for generating a Shared Access Signature for use with Microsoft Azure services.
This package allows you to easily generate a Shared Access Signature for use in REST API calls to Microsoft Azure services. Currently the package generates signatures that are suitable for use with Azure Service Bus (includng Event Hubs).
If you are working with Azure you might be wondering why this package exists given that there are already some Node.js packages. My reasoning is that I was working with some smaller embedded platforms which didn't support some of the packages that Microsoft's own package relied on, so this way I can have tighter control of the dependencies and a very simple package.
Using the package is easy. Just download and install it via NPM.
npm install shared-access-signature
Once the package is downloaded and installed you can call it by requiring in the shared-access-signature
package and calling the generateServiceBusSignature(url, sharedAccessKeyName, sharedAccessKey, expirty)
method.
var sas = require('shared-access-signature');
var url = 'https://namespace.servicebus.windows.net/hubname/publishers/devicename/messages';
var sharedAccessKeyName = 'sample-key';
var sharedAccessKey = 'S4lxDeOkdGFgi7xbIVdBakWpxDaPitKsGFUPFxZKT14=';
var currentDate = new Date();
var expiry = currentDate.getTime() + 3600;
var sas = require('shared-access-signature');
var signature = sas.generateServiceBusSignature(url, sharedAccessKeyName, sharedAccessKey, expiry);
console.log(signature);
The expiry parameter can also take a Date object which is helpful, I recommend checking out the awesome momentjs library to deal with dates and quickly generate Date objects projected into the future.
...
var moment = require('moment');
var expiry = moment().add(1, 'day').toDate();
var signature = sas.generateServiceBusSignature(url, sharedAccessKeyName, sharedAccessKey, expiry);
If you find any bugs or would like to see a feature fork the code and submit a pull request, otherwise raise and issue.
FAQs
This package provides a simple API for generating a Shared Access Signature for use with Microsoft Azure services.
The npm package shared-access-signature receives a total of 24 weekly downloads. As such, shared-access-signature popularity was classified as not popular.
We found that shared-access-signature demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.