Management API Reference

Quickstart

Get started with Openfort libraries

The Openfort JS SDK is the easiest way to onboard your users on-chain.

You will get out of the box support for:

  1. User accounts: Create and manage user accounts with email and password, OAuth, and mobile logins.
  2. Embedded signers: Add and manage email and password, OAuth, and mobile logins to your project to onboard users with backed-in and open-source non-custodial signer management and smart accounts. Out of the box support for JavaScript based frameworks, Unreal Engine and Unity.
  3. Dashboard: Openfort provides a dashboard to manage your project and organizations without the need to interact directly with APIs. Brand it as your own and offer it to your users.
  4. Server: Built-in infrastructure sends transactions on-chain with webhook notification and server-side logic coupled with embedded signer pre-generation.
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 Openfort keys#

From the Openfort Dashboard for select your desired app, navigate to the developers page in the top bar. On the de tab, find the API keys section. Get your Openfort API keys, you will need it in the next step.

You will find two keys:

  • Publishable Key: This value can be safely exposed in a client-side environment.
  • Secret Key: This value should never be exposed in a client-side environment. It should be kept secure and used only in a server-side environment. Learn more on how to use it in the server-side guide. You can further secure it for production applications.

To generate non custodial wallets, you will need to create a Shield instance. At the API keys page, scroll down to the Shield section and click on the Create Shield keys button. A one time pop-up will appear with a variable called encryption share. Its very important that you store it safely. You will not be able to see it again.

Then, in your page, you will see two Shield keys:

  • Publishable Key: This value can be safely exposed in a client-side environment.
  • Secret Key: This value should never be exposed in a client-side environment.

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.


_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: