Can I migrate Single factor to tKey SDK?

Please provide the following details too when asking for help in this category:

  • SDK Version: We’re using keplr wallet which uses torus.js ^5.0.1

Yes, you can can directly integrate the tKey SDK and it will give the same private keys.

Thank you for the answer, but I want to ask you one more. if a user uses same google account, then single-factor(aka. “Single Factor Auth SDKs”) and tKey SSS give same private key?

1 Like

Yes, the private key will be the same.

1 Like
  1. Does tKey solution support ‘persistent login’? (seems not Best way to persist login - Core-Kit on Web? - #3 by vjgee)
  2. ‘Plain’ tKey seems to generate the privateKey randomly on the JS side. So, I think we can’t use this plain tKey method for migration from Single Factor to tKey. Am I right…?
  3. Maybe we can use the privateKey on the ‘Single Factor flow’ for tKey, then it might be meaningless because it’s just a reuse only to follow tKey flow with a same privateKey. Is this is the way that you think for migration?

Sorry I should have given you more details about how we’re using web3auth. Please take a look at below.
We implemented our app using CustomAuth, that is similar with below.

We called it - SingleFactor, I am sorry if that is wrong or makes you confused.
But private-key from above way is different from using tKey-SSS even though same google account is being used and same verifier.

So I appreciate if you let us know it should be different or same, and some details about reason why private-key is different.

@vjgee Hi, vjgee! Can you check the above questions? :slight_smile:

You are using another SDK here which is why you are getting different private keys.

1 Like

Oh… I see, I appreciate for your kindness. :+1:

The CustomAuth SDK gives different keys as compared the our SFA SDK. There’s a parameter in the CustomAuth SDK, enableOneKey, which when set to true can help you get the same key as SFA, however the reverse is not possible. If you want to migrate away from CustomAuth SDK, you need to move the assets of the users to the new account generated by any of our SDKs.

This is happening, since while setting enableOneKey as true, you’re setting a nonce value in the metadata, helping you make it a 2/2 flow, while using a single factor. Hence, while using tKey when you create more shares, your key remains the same. However when it is set to false, there no nonce value set, and the keys are meant to change as you change the threshold.

3 Likes