Skip to main content
Once you’ve authenticated your user with the Sequence APIs and established a session, there are a number of methods available to you to manage the session.

Setup

If you enable StoreSessionPrivateKeyInSecureStorage in your SequenceConfig ScriptableObject, we will automatically store the session wallet information for you (on supported platforms) and expose the ability to attempt to recover the session in SequenceLogin. The default SequenceLoginWindow will automatically handle the UI flow for this as well (see Authentication). If the platform is not supported, this flag will have no effect. Read our Recovering Sessions page for more details on what platforms tools we use to securely store player details.

Integration

You have two options to recover a wallet from storage. First is to use the EmbeddedWalletAdapter class. If this call succeeds, the EmbeddedWalletAdapter contains the Wallet instance.
bool recovered = await EmbeddedWalletAdapter.GetInstance().TryRecoverWalletFromStorage();
Otherwise, use the underlying SequenceLogin class.
(bool storageEnabled, IWallet wallet) = await SequenceLogin.GetInstance().TryToRestoreSessionAsync();
In both cases, you can listen to the SequenceWallet.OnWalletCreated event whenever a wallet was recovered from storage or created during the sign-in process.