Generate a pass phrase for an Account

I have this built-in wallet in my DApp using the AccountIdentifier() function to generate an account for the users and make transactions and logs using the ledger and index canisters.

We are looking to back up users accounts by generating seed phrase for them that will enable them to import their account on other wallets like plug or stoic.

Is there a way to go about this??

1 Like

Are you creating an account identifier?

The Account Identifier is derived from the principal ID (PID) and a subaccount number. There are conversations like this one on how to derive an account identifier using a principal.

The principal ID is the hash of the public key. If I recall correctly, you are using Internet Identity and NFID as login options. The user would then need to recover their principal ID by creating a passkey on either service and saving it. Therefore, they will then be able to access their account.

1 Like

Yes, Im creating an Account Identifier.

Yes, NFID and II as login options.

Ohh okay, so the passkeys can be generated from either service since the AccountIdentifier is actually from the Principal created

1 Like

Yes, that is correct.