Skip to content

Commit 203d648

Browse files
committed
Address review comment
1 parent 5aff119 commit 203d648

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/resources/projects/libraries.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,23 @@ The library author selects which pages to include and publishes the library. Whe
297297

298298
**Library values** are essentially variables created and used by a library author and intended to have their values set by the library user. These values allow library author to create configurable variables that are useful in different contexts, such as public or client-side API keys, global settings, or other project-specific configurations. These values allow library users to input specific data required for the library to function properly in their project.
299299

300-
For example, if someone builds a library with a paginated list or a tabbed interface, they can define Library Values for display settings like `Items per page: 10` or `Initial tab index: 0`. This allows the library user to easily customize the UI behavior to fit their project’s needs without modifying the library’s internal logic.
300+
For example, if someone builds a payment gateway library, they might define Library Values for configuration settings, such as:
301+
302+
- Default currency: USD
303+
- Region: US
304+
- Default Payment method: Card
305+
306+
This allows the user importing the library to provide their own payment preferences without modifying the internal code of the library.
301307

302308
:::danger
303309
**Library Values should not be used to store private or sensitive data**, such as secret API keys or credentials. These values are not currently designed to securely store or handle sensitive information.
304310

305-
The use of *public API key* is generally acceptable, because the keys often have limited permissions, rate limits, or are intended for public use. For instance, if someone creates a library that connects to a public weather API, they might define a Library Value for the API key. Users of that library can then input their own API key to make it work.
311+
The use of *client-side* or *publishable* API key is generally acceptable, because the keys often have limited permissions, rate limits, or are intended for public use. For instance, if someone creates a library that connects to a public weather API, they might define a Library Value for the API key. Users of that library can then input their own API key to make it work.
306312
:::
307313

314+
:::tip
315+
To avoid misuse on any type credential, make sure to apply appropriate restrictions to limit its usage. For example, see how to [**restrict a Google Maps API key**](../../ff-integrations/google-cloud/secure-keys.md#add-restrictions-to-your-api-key) in the Google Cloud Console.
316+
:::
308317

309318
### Create Library Values as Author
310319

0 commit comments

Comments
 (0)