Installation
@secrecy/lib is a TypeScript/JavaScript SDK distributed as an ES module and running in the browser. It is framework-agnostic: use it with any bundler, framework or plain script setup.
Requirements
| Requirements |
|---|
Get a Secrecy (opens in a new tab) account |
Get your Secrecy App ID (opens in a new tab) |
| Use an ES module bundler or runtime targeting modern browsers |
First of all, a Secrecy account (opens in a new tab) is needed to use the Secrecy SDK . Creating an account is free and without obligation. You can opt for one of these plans, depending on the needs of your project.
Your secrecy App Id is required to retrieve an authenticated secrecy client. You can obtain it by creating a project on the secrecy tech dashboard (opens in a new tab). We recommend that you keep it in a secure place, for example in an environment variable.
Install
Install the latest version of the @secrecy/lib library into your project.
npm install @secrecy/libAuthentication
getSecrecyClient and login are documented in the auth section, with their options and the login flow.
Next step
Follow the quickstart to get an authenticated client and fetch the current user.