Management API Reference

Quickstart

Get started with Openfort libraries

The Openfort JS SDK is the easiest way to onboard your users onchain.

You will get out of the box support for:

  1. Multiple login methods
  2. Bare-meteal API access to customize your own UI
  3. Non-custodial embedded signer
  4. Account abtraction compatioble accounts and infrastructure
Want to start building right away?

Check out the starter repos for templates for integrating Openfort with various libaries, frameworks and use cases.

1. Install the Openfort SDK#

Install the latest version of the Openfort JS SDK using your package manager of choice:

Prerequisites

In order to integrate Openfort, you project must:

Terminal

_10
npm install @openfort/openfort-js@latest

2. Set your auth providers#

Navigate to the auth providers page on the Openfort dashboard by selecting your project and then clicking Auth providers Methods in the side bar in the players page. Select the account types you'd like users to be able to login with. For more information on how to enable social logins, check out the dashboard docs.

3. Get your API keys#

In the API keys section, you'll find:

  • Publishable Key: Safe to expose in client-side environment
  • Secret Key: Must be kept secure and used only server-side

To generate non-custodial wallets:

  1. Scroll to the Shield section and click Create Shield keys
  2. Store the encryption share safely when it appears (you'll only see it once)
  3. You'll receive:
    • Shield Publishable Key: Safe for client-side use
    • Shield Secret Key: Keep secure, server-side only

4. Import Openfort into your app#

In your project, import the Openfort and configure it. Set the publishable keys fields to the publishable key you got from the Dashboard in step 3.

Concretely, the Openfort SDK needs to be instantiated only once.

server.ts

_10
import Openfort from "@openfort/openfort-js";
_10
_10
const openfort = new Openfort({
_10
baseConfiguration: {
_10
publishableKey: "YOUR_OPENFORT_PUBLISHABLE_KEY",
_10
},
_10
shieldConfiguration: {
_10
shieldPublishableKey: "YOUR_SHIELD_PUBLISHABLE_KEY",
_10
}
_10
});

5. You're good to go!#

Once you've configured your app, you can now use openfort throughout to access the Openfort SDK.

Check out our starter repo to see what a simple end-to-end integration looks like, or read on to learn how you can use Openfort to: