Pregenerating an embedded signer
You can pregenerate self-custodial smart account associated with a given account, like an email address or social login, without requiring the user to login. You can even send assets to the wallet before the user logs in to your app for the first time. Once the user associated with the account logs in, they will be able to access the pregenerated wallet and any assets sent to them. To pregenerate embedded signers, use one of the supported backend SDKs:
A user can easily claim their pregenerated account simply by logging into your app with one of its linked accounts.
In the body of the request:
- Include a
thirdPartyUserId
array that contains the user's account to claim the wallet. - Include a
thirdPartyProvider
array that contains the provider used: Openfort, custom, supabase, etc. - Include a
preGenerateEmbeddedAccount
boolean with the valuetrue
.
A successful response will include the new user object along with their DID and embedded signer address, like below: