Social Login Signatures

Hi everyone,

I need to be able to create signatures with the private keys generated by the Social Login feature. The use case is creating users in a CMS and logging them in automatically when they connect their wallet.

After initializing the SocialLogin class I’m trying to use the getPrivateKey function, to set up an ethers Wallet to handle the signature.

await this.socialLogin.init();



const key = await this.socialLogin.getPrivateKey();
const wallet = new ethers.Wallet(key);

const str = "Hello World";            
const signature = await wallet.signMessage(str);

However, when I try to connect Metamask or Wallet Connect, I get the following Error messages respectively:


MetaMask - RPC Error: The method "eth_private_key" does not exist / is not available.

Wallet Connect:

Uncaught (in promise) Error: Method not supported.

Any help with the error or other ideas on approaching my use case would be appreciated.