Sphereon-Opensource / SIOP-OID4VP

Self Issued OpenID Provider v2 (SIOP) with optional OpenID for Verifiable Presentations (OpenID4VP)
77 stars 25 forks source link

verifyAuthenticationRequest() fails due to dev.uniresolver.io being down #12

Closed astanciu closed 2 years ago

astanciu commented 2 years ago

About 30-50% of the time calls to verifyAuthenticationRequest() fail. Network tab shows that requests are pending/failing for DID resolution against https://dev.uniresolver.io/1.0/identifiers/did:ethr:......

How can this resolver be replaced with something else?

nklomp commented 2 years ago

Hi @astanciu

The uniresolver is being hosted by DIF I believe and outside of this projects scope. That being said, there are 2 ways to go about it. https://github.com/Sphereon-Opensource/did-auth-siop/blob/develop/src/main/functions/DIDResolution.ts is responsible for the actual DID resolution in the project

1) You can point to another UniResolver installation. Possibly one you setup yourself. This can be done by providing the URL of the Universal Resolver installation through the opts.verification.resolveOpts.resolveUrl option.

2) Change the resolver for your method directly if supported by https://github.com/decentralized-identity/did-resolver by updating the opts.verification.resolveOpts.resolver parameter with your resolver.

Given we use our Universal Resolver Client package from https://github.com/Sphereon-Opensource/did-uni-client , you can use all the configuration parameters including environement variables available to create your own resolver for 1 or more DID methods, which you could pass on to the parameter mentioned in 2) . Please not that if you use our universal did client as a resolver, you still need to have a functioning Universal Resolver installation somewhere, as that package is a client for Universal Resolver systems.

Also see https://github.com/Sphereon-Opensource/did-auth-siop#did-resolution for a bit more information