1.0.33 • Published 1 month ago

@googlemaps/url-signature v1.0.33

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 month ago

Google Maps JavaScript URL Signing

npm Build Release codecov GitHub contributors semantic-release npm.io

Description

Sign a URL for Google Maps Platform requests.

Warning: It is not recommended to use this library in client side applications to avoid exposing the secret used to sign the URL.

Install

Available via npm as the package @googlemaps/url-signature.

npm i @googlemaps/url-signature

Documentation

Check out the reference documentation.

Example

Create a signature for a Google Maps request URL or url string.

const signature = createSignature("https://example.com/some-path?foo=bar", "secret");

Returns a new URL having a signature parameter.

const signedUrl = signUrl("https://example.com/some-path?foo=bar", "secret");
signedUrl.href; // "https://example.com/some-path?foo=bar&signature=..."

Create a signature for a path and query string using Hmac SHA1.

const signature = createSignatureForPathAndQuery("/some-path?foo=bar", "secret");

Note: This is not an officially supported Google product

1.0.33

1 month ago

1.0.32

3 months ago

1.0.31

4 months ago

1.0.30

5 months ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.22

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.21

2 years ago

1.0.19

2 years ago

1.0.20

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.9

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago