uport-project / docs

uPort Documentation
http://developer.uport.me
Apache License 2.0
3 stars 2 forks source link

The verifyJWT might require the options.audience to run properly #16

Closed kamescg closed 6 years ago

kamescg commented 6 years ago

Using the verifyJWT function to verify a JWT.

https://developer.uport.me/did-jwt/guides/index/#parameters-1

I noticed in the audience parameter the options parameter is set to required FALSE, but I receive the error JWT audience is required but your app address has not been configured. when I do not set the audience parameter

Therefore I set audience parameter, to my DApps MNID, and everything works as expected.

verifyJWT(request.body.JWT, {
      audience: uportAppAddress // MNID of registered Decentralized Application.
    }).then(verifiedJWT => {
      console.log(verifiedJWT)
      ... // De more Things
    })
localredhead commented 6 years ago

@KamesCG this actually an issue in the ETH-DID repo's readme. I'll move this issue here: https://github.com/uport-project/did-jwt/issues/11