ceramicstudio / js-3id

Authentication system for Ceramic apps that works with blockchain wallets.
Other
107 stars 41 forks source link

DID is not getting authenticated using 3id-connect and EthereumAuthProvider #230

Closed asnal closed 2 years ago

asnal commented 2 years ago

Description

I am trying to authenticate a DID using 3id-connect and set a basicProfile but at await ceramic.did.authenticate() i am getting this error on the console: did.ts:260 Uncaught (in promise) TypeError: did_jwt_1.verifyJWS is not a function at DID. (did.ts:260:1) at Generator.next () at fulfilled (resolver.ts:226:1) Here is the code snippet:

`const [address] = await window.ethereum.request({
  method: 'eth_requestAccounts'
  })
const ceramic = new CeramicClient(endpoint)

const threeIdConnect = new ThreeIdConnect()

const provider = new EthereumAuthProvider(window.ethereum, address)

await threeIdConnect.connect(provider)
const did = new DID({
  provider: threeIdConnect.getDidProvider(),
  resolver: {
    ...ThreeIdResolver.getResolver(ceramic)
  }
})
console.log("DID:",did)
ceramic.setDID(did)
await ceramic.did.authenticate()`
PaulLeCam commented 2 years ago

@asnal what versions of the dependencies are you using please? Could you provide an example setup to reproduce the issue?

asnal commented 2 years ago

@PaulLeCam the issue was resolved by what @Sterahi suggested on discord. She also mentioned that these bugs will be fixed in future releases. If you want i can close the issue for now.