Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

@googlemaps/url-signature

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@googlemaps/url-signature

Sign a URL for Google Maps Platform requests.

latest
Source
npmnpm
Version
1.0.40
Version published
Weekly downloads
771K
11.37%
Maintainers
3
Weekly downloads
 
Created
Source

Google Maps JavaScript URL Signing

npm Build Release codecov GitHub contributors semantic-release

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

Keywords

google

FAQs

Package last updated on 13 Jan 2025

Did you know?

Socket

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.

Install

Related posts