Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Overview JavaScript

The Openfort JavaScript SDK is a JavaScript library client for Openfort that allows you to add secure authentication, non-custodial embedded wallets, and powerful UX infrastructure into your game.

Features

FeatureStatus
Sign in with email
Sign in with OAuth
Sign in with guest mode
Sign in with Third-Party Auth
Embedded wallet creation
Embedded wallet recovery
Embedded wallet signatures & transactions
Native smart wallets
Gas sponsorship
Session keys

SDK Exports

The JavaScript SDK exports the following:

ExportDescription
OpenfortMain SDK class
openfortEventsGlobal event emitter for subscribing to SDK events
AuthApiAuthentication API namespace
EmbeddedWalletApiEmbedded wallet API namespace
UserApiUser management API namespace
ProxyApiTransaction proxy API namespace
OpenfortErrorBase error class
AuthenticationErrorAuthentication-related errors
AuthorizationErrorAuthorization-related errors
ConfigurationErrorSDK configuration errors
OAuthErrorOAuth provider errors
OTPErrorOTP verification errors
RecoveryErrorWallet recovery errors
RequestErrorNetwork request errors
SessionErrorSession management errors
SignerErrorSigner/wallet errors
UserErrorUser management errors
OPENFORT_ERROR_CODESError code constants
OPENFORT_AUTH_ERROR_CODESAuth-specific error codes
IStorageCustom storage interface
cryptoDigestCrypto utility function
RecoveryMethodRecovery method enum (AUTOMATIC, PASSWORD, PASSKEY)
AccountTypeEnumAccount type enum (SMART_ACCOUNT, EOA)
ChainTypeEnumChain type enum (EVM, SVM)
OAuthProviderOAuth provider enum
ThirdPartyOAuthProviderThird-party auth provider enum
OpenfortEventsEvent type constants

For detailed error handling, see the Error Handling guide.

Get started

Check out these popular guides to get started.

Templates

Check out these popular samples to get started.

Copyright © 2023-present Alamas Labs, Inc