Socket
Book a DemoInstallSign in
Socket

@exweiv/wix-secret-helpers

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exweiv/wix-secret-helpers

Some basic helper functions for secrets in Wix, works with @wix/secrets SDK module.

latest
Source
npmnpm
Version
2.1.4
Version published
Weekly downloads
62
-88.19%
Maintainers
1
Weekly downloads
 
Created
Source

This library provides a convenient helper for securely retrieving secrets from Wix Secrets Manager, with built-in memory caching and optional JSON parsing.

Note: this library uses @wix/essentials SDK to grant access to secrets for any client. This is usually fine but in some cases you may not want it, in these cases disable elevateAccess in options.

Usage

Basic Example: Retrieve a Secret as a String

import { getSecretValue } from '@exweiv/wix-secret-helpers';

// Returns `string`
const weatherAPIKey = await getSecretValue({ secretName: "WeatherAPIKey" }); 
const client = new WeatherClient(weatherAPIKey);

Advanced Example: Retrieve and Parse a JSON Secret

import { getSecretValue } from '@exweiv/wix-secret-helpers';

// Returns defined `object`
const twitterAPIConfig = /** @type {{appKey: string, appSecret: string, accessToken: string, accessSecret: string}} */ (await getSecretValue({ secretName: "TwitterJSON", parseJSON: true }));
const client = new TwitterAPI(twitterAPIConfig);

Features:

  • Memory caching (enabled by default, but can be disabled)
  • Optional JSON parsing for secrets stored as JSON

Kolay Gelsin 💜

Keywords

wix

FAQs

Package last updated on 14 Sep 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