Web3Auth / mpc-core-kit

16 stars 5 forks source link

[v3] loginWithOauth is throwing error #146

Closed AyushBherwani1998 closed 5 months ago

AyushBherwani1998 commented 6 months ago

Description

When trying to log in using loginWithOauth, the Web3AuthCoreKit instance throws errors.

Reproducible Example

https://github.com/Web3Auth/web3auth-core-kit-examples/tree/mpc-core-kit-v3/mpc-core-kit-web/implicit-flow-examples/mpc-core-kit-popup-flow-example

I tried multiple accounts, but still same issue. I tried to reset my older account which was asking for a recovery factor, it reset my account successfully but then I was not able to log in.

Recording

https://github.com/Web3Auth/mpc-core-kit/assets/34301187/1a7e11e8-611f-4c6f-a542-6a703fa14a03

Error

{
"name": "CoreKitError",
"code": 1000,
"message": "undefined verifier userinfo not found, not logged in yet"
}

Console:

Error: verifier userinfo not found, not logged in yet
    at TSSTorusServiceProvider.getTSSPubKey (tss.esm.js:136:1)
    at TKeyTSS._initializeNewTSSKey (tss.esm.js:838:1)
    at TKeyTSS.initialize (tss.esm.js:217:1)
    at async mpcCoreKit.esm.js:1635:1
    at async Web3AuthMPCCoreKit.atomicSync (mpcCoreKit.esm.js:1574:1)
    at async Web3AuthMPCCoreKit.handleNewUser (mpcCoreKit.esm.js:1619:1)
    at async Web3AuthMPCCoreKit.setupTkey (mpcCoreKit.esm.js:1608:1)
    at async Web3AuthMPCCoreKit.loginWithOauth (mpcCoreKit.esm.js:1124:1)
    at async login (App.tsx:108:1)
AyushBherwani1998 commented 6 months ago

Fixed with v3-alpha2 release. Tested out with core-kit implicit examples

AyushBherwani1998 commented 6 months ago

Just noticed an error that comes when we try to login using loginWithOauth. It comes from brief moment. The other thing I noticed is that canceling the operations takes a lot of time to redirect. Both can be observed in the screen recording below.

{
  name: CoreKitError,
  code: 1000,
  Undefined  cannot read the properties of null (reading 'metadata')
}

https://github.com/Web3Auth/mpc-core-kit/assets/34301187/d60d8e02-83e7-46ce-a521-9925459e0645

matthiasgeihs commented 5 months ago

This is fixed in https://github.com/tkey/tkey/pull/282. Still need to release tkey and update here.

himanshuchawla009 commented 5 months ago

Updated tkey in v3 branch with the fix. @AyushBherwani1998

AyushBherwani1998 commented 5 months ago

Fix works fine @himanshuchawla009

matthiasgeihs commented 5 months ago

Fixed in 8196086cfae9adf265d33496533522be86eaf92d