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);
})