Unreal Engine SDK
The Openfort SDK for UE helps you integrate your game.
- Windows (64-bit)
- macOS (minimum version 10.5)
- Android (minimum version 8.0)
- iOS (minimum version 15.2)
- Unreal Engine 5.2
- Unreal Engine 5.0
Build Platform | Unreal Engine Version | Windows | MacOS | iOS | Android |
---|---|---|---|---|---|
Windows | 5.0.3 | ✅ | ❌ | ❌ | ✅ |
5.2.1 | ✅ | ? | ? | ✅ | |
macOS | 5.2.1 | ❌ | ✅ | ✅ | ✅ |
Installation#
Since .uasset
and .umap
files are stored on Git Large File Storage, you must download and install git-lfs before cloning the repository.
- Clone the openfort-unreal-sdk repository.
- Copy the cloned repo into your project's
Plugins
folder, e.g.:MyGame/Plugins/openfort-unreal-sdk
. - Restart your project (Unreal Editor & Jetbrains Rider IDE), upon restart it should load the
unreal-sdk-plugin
and should be good to use.
Setup#
Blueprint#
See the included sample widgets in All->Plugins->Openfort Content
in the Unreal Editor content browser for examples of how to use the plugin in Blueprint. If you don't see a Plugins
folder under All
you may need to enable Show Plugin Content
in the content browser's Settings
menu.
C++#
Check out the OpenfortOpenfortSDK.h
file for the C++ Identity API. In order to know the list of methods to call for the Identity Login Flow and the Identity Log out Flow, follow the same sequence of steps as the Blueprint widget examples below.
Quickstart#
Authentication with Openfort Auth#
We use the Device Code Authorization flow to authenticate and authorize users. To log in the user:
Call the Authenticate
blueprint node. This will open the user's default browser and take them through the auth flow.
Log out of Openfort Auth#
To initiate the logout process, utilize the Logout node demonstrated below. Two logout options are available:
- Hard Logout: This option clears sessions from both the SDK (local) and the browser used for login. The SDK will open a browser to clear the browser session during the logout process.
- Soft Logout: If there is a desire to bypass opening the browser during the logout process, set the
DoHardLogout
parameter tofalse
. This will perform only a local logout, and users will remain logged in to Identity in the browser until the session expires.
Supported Functionality#
Method | Functionality |
---|---|
Init | Initializes OpenfortSDK with various parameters |
LogInWithEmailPassword | Logs the user in using email and password |
SignUpWithEmailPassword | Signs up a new user with email and password |
LinkEmailPassword | Links an email and password to the user account |
UnlinkEmailPassword | Unlinks an email and password from the user account |
RequestResetPassword | Requests a password reset |
ResetPassword | Resets the user's password |
RequestEmailVerification | Requests an email verification |
VerifyEmail | Verifies the user's email |
InitOAuth | Initializes OAuth for the user |
AuthenticateWithOAuth | Authenticates the user with OAuth |
UnlinkOAuth | Unlinks OAuth from the user account |
PoolOAuth | Pools OAuth for the user account |
InitLinkOAuth | Initializes the link OAuth process |
AuthenticateWithThirdPartyProvider | Authenticates the user with a third-party provider |
InitSiwe | Initializes Sign-In with Ethereum (SIWE) |
AuthenticateWithSiwe | Authenticates the user with SIWE |
LinkWallet | Links a wallet to the user account |
UnlinkWallet | Unlinks a wallet from the user account |
StoreCredentials | Stores authentication credentials |
GetUser | Gets the user information |
Logout | Logs the user out and removes stored credentials |
GetAccessToken | Gets the currently saved access token |
ValidateAndRefreshToken | Validates and refreshes the access token |
SendSignatureTransactionIntentRequest | Sends a signature transaction intent request |
SignMessage | Signs a message |
SignTypedData | Signs typed data |
SendSignatureSessionRequest | Sends a transaction signed by a session |
GetEmbeddedState | Gets the embedded state |
GetEthereumProvider | Gets the Ethereum provider |
ConfigureEmbeddedSigner | Configures the embedded signer |