Security question share getting deleted for an account

I am creating a social login share using sfa module , then initializing tKey module with that. This gives me a private key with two default shares. I then setup a security question for this account. I am able to login with this account for a while.

Then suddenly once in a while validating the user , i ask the user the security question i see that this account doesnot have a security question setup.
How can i fix this?

Its a deterministic process , so the same private key should be generated and it should have a security question setup. But i don’t see the security question setup.

Verifier = “axir-wallet-prod”

VerifierId (it is dynamic according to user), For Ziad ID it is = 8

User Id = 8

JWT = “eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6OCwiaWF0IjoxNzAzMTg3MjM4LCJleHAiOjE3MDMyNzM2Mzh9.31m4RcKlxCdZRlViLj9dzJfpWjYdQ5H5KrT6GENn_ZI”

Social Login Share = “074fd3c53934fccf5c02bf9793e77dc185ca3bcbe772f4848b46838ac989e425”

Tkey Modules with Versions:
@tkey/core”: “^8.1.0-alpha.0”,
@tkey/default”: “^8.1.0-alpha.0”,
@tkey/react-native-storage”: “^11.0.0”,
@tkey/security-questions”: “^8.1.0-alpha.0”,
@tkey/service-provider-base”: “^8.1.0-alpha.0”,
@tkey/share-serialization”: “^8.1.0-alpha.0”,
@tkey/share-transfer”: “^8.1.0-alpha.0”,
@tkey/storage-layer-torus”: “^8.1.0-alpha.0”,

// CODE TO GENERATE THE PRIVATE KEY
import ThresholdKey from ‘@tkey/default’;
import SecurityQuestionsModule from ‘@tkey/security-questions’;
import TorusServiceProvider from ‘@tkey/service-provider-base’;
import TorusStorageLayer from ‘@tkey/storage-layer-torus’;
import { ShareTransferModule } from ‘@tkey/share-transfer’;
import { ShareSerializationModule } from ‘@tkey/share-serialization’;

const tKey = new ThresholdKey({
serviceProvider: serviceProvider,
storageLayer,
modules: {
shareTransfer: shareTransferModule,
securityQuestions: securityQuestionsModule,
shareSerializationModule: shareSerializationModule,
},
});

const verifier = “axir-wallet-prod”;
const verifierId = 8;
const socialShare = “074fd3c53934fccf5c02bf9793e77dc185ca3bcbe772f4848b46838ac989e425”;

tKey.serviceProvider.postboxKey = socialShare;
(tKey.serviceProvider as any).verifierName = verifier;
(tKey.serviceProvider as any).verifierId = verifierId;

tKey.initialize().catch(e => {
console.log(“TKEY INIT ERROR”,e);
})

@abhishek.sagu Thanks for your recent communication.

Your issue has been forwarded to our Dev team and we will get back with further updates.

Could you share your code on how you get the tkey and security question setup?
also how you check for the security question.

@cherngwoei I have added the code we are using with the sdk versions above.

hi @cherngwoei , any update on this ?

hi @cherngwoei @vjgee , any updates on this ? Its a blocker issue for us.

hi @cherngwoei , @vjgee any updates on this issue ?

@abhishek.sagu , sorry for the delay
I was on year end leave.

Regarding your issue,
I need more details on the code on how you add/check for security question.
It would be great if you can extract to a small working repo and add me to check on it.
Thanks.

hi @cherngwoei , sorry we cannot share the repo with you as requested. I have added the details in the post itself , the following are the code regarding security question share and how we are using it.

// Generating Security Question Share:

await (
tKey.modules.securityQuestions as any
).generateNewShareWithSecurityQuestions(
“WHAT_IS_YOUR_PIN”,
“4545”,
);

// Updating Security Question Share:

await (
tKey.modules.securityQuestions as any
).changeSecurityQuestionAndAnswer(“4646”, “WHAT_IS_YOUR_PIN”);

// Getting Security Question:

const securityQuestions = await (
tKey.modules.securityQuestions as any
).getSecurityQuestions();

hi @cherngwoei , do let us know if you need anything more from us and how to fix this issue. Thanks

hi @cherngwoei , @vjgee , any updates on this issue ?

Hi,

Does this issue affect all your users or some user or just this user ?
Could you try login with security question and answer after

  • a new account is created and logout ?

We have too little information to debug the issue.

hi ,

we got this issue for like 3-4 users so far. Usually what happens is user is able to register and even use an account a few times but then suddenly once in a while , user is not able to do so since the security question suddenly disappeared. Its not acceptable since that user might have a lot of crypto on his account.

We cannot login with this user since he has only one share , the social login share , the other share was supposed to be security question and it suddenly disappeared.

Could you please tell us what more information you need from our side to debug this issue? We have already given you the sdks we are using , the verifier details and the methods we are calling.

hi @cherngwoei , do let me know what else info you need to debug this issue. Thanks.

hi @vjgee , @cherngwoei any updates on this issue ?

hi @vjgee , @cherngwoei any updates on how to solve this issue ?

Does the user managed to login with security question before?
So beside these 3-4 users, other users can login with security question?

I would need access to you code base or minimal recreation of the usage in your app to further pinpoint the issue.

hi @cherngwoei , we cannot share the codebase with you. Do let me know when can we arrange a call to fix this issue or do let me know how else can we fix this issue.

hi @vjgee , @cherngwoei , do let us know when can we schedule a call for this issue. Thanks

Hey @abhishek.sagu

Following up here to check if the issue is fixed.