Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple did methods aren't supported #31

Open
siacomuzzi opened this issue Sep 22, 2022 · 4 comments
Open

multiple did methods aren't supported #31

siacomuzzi opened this issue Sep 22, 2022 · 4 comments

Comments

@siacomuzzi
Copy link

Hi,

I think I found an issue in /functions/DIDResolution.ts:

https://github.com/Sphereon-Opensource/did-auth-siop/blob/cdbbcfe3c9e5d7a7b099abbf8371230485acc7e9/src/main/functions/DIDResolution.ts#L17-L24

Please note that uniResolvers is an array, so ...uniResolvers will send N args to the Resolver constructor (where N is the number of elements of the array). Causing that only the first element of the array is configured as resolver.

Proposed fix, use a json object instead of array:

let uniResolvers = {};
for (const didMethod of opts.didMethods) {
  const uniResolver = getUniResolver(getMethodFromDid(didMethod), { resolveUrl: opts.resolveUrl });
  uniResolvers = { ...uniResolvers, ...uniResolver };
}
return new Resolver(uniResolvers);
@nklomp
Copy link
Contributor

nklomp commented Sep 22, 2022

Hmzz, we will have to revisit this, as a PR is about to be merged that completely changes the way we build the different resolver options @sksadjad

@sksadjad
Copy link
Contributor

Yes we have some issues with this, but it'll be fixed in the branch v2.0.0 which eventualy make the v3.0.0 version of did-auth-siop

@nklomp
Copy link
Contributor

nklomp commented Sep 22, 2022

0.3.0 you mean

@nklomp
Copy link
Contributor

nklomp commented Sep 22, 2022

(We are still in alpha state at this point)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants