Using tKey js SDK for creating shares

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

  • SDK Version: @tkey/default : ^7.0.0
    I am trying to do the following
    1.) User logs in with google , which should create a private key with user login as the first share.
    2.) The second share should be created and stored in browser storage.
    3.) The third share should be a password aka a security question
    4.) The fourth share should be a mnemonic.

I am trying to run the tkey/react popup example and facing the following issue.

1.) When user logs in , it creates and stores a share in browser storage. I don’t see the code for doing this. Does the following code do so ?
const webShare=await (tKey.modules.webStorage as any).inputShareFromWebStorage(); // 2/2 flow

2.) How to configure the threshhold value for the shares. For example if i want that i should have 3 out of 4 created shares, how should i configure and and where in the code should i configure it.
3.) Even when i delete the browser storage share and again login , it still shows requiredkeys as 0. So how is it getting the second share ?
4.) Is the tkey/sdk storing all shares in the metadata layer ? if yes , does that not defeat the purpose of creating shares as one who gets access to the social login get access to all other shares?
5.) Can we do the login using sms and otp with this flow ?

This code input backs the shares to tKey. To your question above, web storage share is managed automatically by tKey as soon as you include web storage module during initialisation.

For points 2 & 3: please refer to this link Clarification on tkey-example

For point 5: You can create SMS passwordless verifier and you will be able to do the login though that

Thank you @annie for your reply, i want to ask some followup questions.

Point 1 .) You said that when you use webstorage modules , it automatically takes care of the second share. For the mobile version , the device share should be something like biometric right? How will it handle the device share in that case ? Should i use the security questions share there and somehow store biometric share using that ?

Point 2 and 3.) I saw the post regarding points 2 and 3. It still doesn’t answer my question as to how can i can configure the threshhold part of the private key that i am generating. i mean how do i configure how many shares does user require to create the private key. 2/3 threshhold or 3/4 threshhold?

Point 4.) Still waiting for the reply.

I am also interested to learn more on point 4