How can I export user private key?

I’m working on a product where the user will be able to export their private key and have direct access to the wallet or assets outside of the application.

In documentation I see that the key returned here is in-app only.

await web3auth.provider?.request({
  method: "eth_private_key", // use "private_key" for other non-evm chains
});

How do I get access to export the actual private key that can be used outside the application?

Hi Lev,

Thank you for reaching out! It sounds like you’re working on a crucial feature for your application.

Currently, the Web3Auth SDK is designed with user security in mind, so accessing the actual private key outside of the application is typically restricted to prevent potential security risks. The in-app only private key that you are referring to is meant to enhance security by not allowing easy exports.

Unfortunately, you won’t be able to export the actual private key due to these security protocols. However, you might consider utilizing wallet connectors or integrating other methods for user access management that align with Web3Auth’s features.

If you’re looking for alternative ways to facilitate user access while maintaining security, I’d be happy to assist further!

Let me know if you have any other questions or need clarification!

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

Are there any workarounds for adding this feature? It’s critical from a legal point of view

Hey @uchitel1607

This is the privateKey, which can be used outside the web3auth.

Are you referring to not allowing the export or allowing the export from your dApp?