Skip to content

Commit 045ebd9

Browse files
committed
Update README
1 parent 50c60c0 commit 045ebd9

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ This library has zero depdendencies.
55

66
We used it in our [sepa-form-recogizer](https://neurocode.io/blog/sepa-payment-recognizer?s=github) API
77

8+
## Whats a SAS token?
9+
10+
![sas](./sas-storage-uri.png)
11+
12+
s
13+
The SAS token is a string that you generate on give your client for temp access to your Azure storage. The Azure Storage client library does not work in the browser since it uses NodeJS crypto to compute the HMAC SHA256.
14+
15+
This library uses webCrypto to compute the HMAC SHA and is thus compatible with cloudflare workers.
16+
17+
818
## Install
919

1020
Use either npm or yarn
@@ -31,6 +41,12 @@ const { blobSasUrl } = await createBlobSas({
3141

3242
```
3343

44+
Be careful with **startsOn** property. If you set the start time for a SAS to the current time, you may observe failures occurring intermittently for the first few minutes due to different machines having slight variations the current time (known as clock skew).
45+
46+
In general, set the start time to be at least 15 minutes in the past. Or, don't set it at all :)
47+
48+
49+
3450
## Current implementation
3551

3652
- [x] Blob SAS token

sas-storage-uri.png

17 KB
Loading

0 commit comments

Comments
 (0)