When asking for help in this category, please make sure to provide the following details:
- SDK Version: “@web3auth/single-factor-auth”: “^9.5.0”
- Platform: Web
I’m using Single Factor Auth (SFA) for my website. Previously, my website only supported the Ethereum network, so I used the Ethereum private key provider. For server-side verification, I used web3auth.authenticateUser() to obtain the idToken, and retrieved the eth_private_key to derive the appPubKey:
const app_scoped_privkey = (await web3auth.provider?.request({
method: "eth_private_key",
})) as string;
const app_pub_key = getPublicCompressed(
Buffer.from(app_scoped_privkey.padStart(64, "0"), "hex")
).toString("hex");
const { idToken } = await web3auth.authenticateUser();
However, I now want to support the Solana network on my website. The issue is that I cannot obtain the idToken when using the ed25519 curve. Here’s what I see when decoding the idToken:
wallets: [
{
public_key: '',
type: 'web3auth_threshold_key',
curve: 'secp256k1'
}
],
As you can see, the ed25519 curve is missing.
In my mobile app, which uses the React Native SDK, I am able to achieve this using:
My mobile app uses react-native-sdk, and I can achieve it by using
await web3auth.login({
mfaLevel: "none",
loginProvider: "jwt",
curve:'other'
});
How can I achieve the same behavior using the SFA Web SDK?