when i sign in freshly (no shares have been generated prior and requiredShares value from tKey.getKeyDetails() is 0), then without using tKey.updateSDK() i cannot generate the device share (due to error 1103 “Metadata not found, SDK likely not initialized”)
After a device share is generated and stored on the browser localStorage, signing in next time fails without updateSDK() call (as the requiredShare value is 1 but the share was not stored on the device, as the generateShare() call in step 1 fails).
If I use updateSDK when freshly signing in, then the device share is generated and written to localStorage but next time I login (and requiredShares shows 1), the share in the localStorage is not being detected by tKey.
Yes, the example code is working for me, and i really need help understanding the difference in the flow between the example and my codebase, which i have attached in 5 screenshots:
I’ve removed the clientId (both of google and web3auth’s) for the screenshot.
Note that i have never been able to achieve the log “Recovered share input successfully” as getDeviceShare() (this function is exactly as the one in the example) throws an error, with or without the updateSDK() logic.
The error is “could not find metadata, sdk likely not initialized” if the share was generated when requiredShares was 0 and “Device share not found” if the share was generated after updateSDK() when requiredShares was 0.
Both these errors happen in the case when requiredShares is 1. The private key generation happens perfectly when requiredShares is 0.