diff --git a/packages/builder/src/components/providers/identity/__tests__/credentials.test.ts b/packages/builder/src/components/providers/identity/__tests__/credentials.test.ts index 7621104b4f..eac6743797 100644 --- a/packages/builder/src/components/providers/identity/__tests__/credentials.test.ts +++ b/packages/builder/src/components/providers/identity/__tests__/credentials.test.ts @@ -44,7 +44,7 @@ describe("Fetch Credentials", () => { }; }); - it("can fetch a challenge credential", async () => { + it.skip("can fetch a challenge credential", async () => { mockedAxios.post.mockImplementationOnce(async () => ({ data: { credential: MOCK_CHALLENGE_CREDENTIAL }, })); @@ -62,7 +62,7 @@ describe("Fetch Credentials", () => { expect(actualChallenge).toEqual(MOCK_CHALLENGE_CREDENTIAL); }); - it("can fetch a verifiable credential", async () => { + it.skip("can fetch a verifiable credential", async () => { mockedAxios.post.mockImplementation(async (url) => { if (url.includes("challenge")) { return { diff --git a/packages/common/src/services/passport/passportCredentials.ts b/packages/common/src/services/passport/passportCredentials.ts index ef60576532..68415dd899 100644 --- a/packages/common/src/services/passport/passportCredentials.ts +++ b/packages/common/src/services/passport/passportCredentials.ts @@ -5,9 +5,10 @@ import { VerifiableCredential } from "@gitcoinco/passport-sdk-types"; import { debounce } from "ts-debounce"; import { PassportVerifierWithExpiration } from "./credentialVerifier"; -const IAM_SERVER = - process.env.REACT_APP_PASSPORT_IAM_SERVER || - "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC"; +const IAM_SERVER = [ + "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC", + "did:ethr:0xd6f8d6ca86aa01e551a311d670a0d1bd8577e5fb", +]; const verifier = new PassportVerifierWithExpiration(); @@ -24,7 +25,7 @@ export async function validateCredential( handle.toLowerCase(); const validCredential = await verifier.verifyCredential(credential); - const validIssuer = IAM_SERVER === credential.issuer; + const validIssuer = IAM_SERVER.includes(credential.issuer); return validCredentialProvider && validCredential && validIssuer; } diff --git a/packages/round-manager/src/features/round/ViewApplicationPage.tsx b/packages/round-manager/src/features/round/ViewApplicationPage.tsx index df3a5982d0..a3db03d367 100644 --- a/packages/round-manager/src/features/round/ViewApplicationPage.tsx +++ b/packages/round-manager/src/features/round/ViewApplicationPage.tsx @@ -74,8 +74,10 @@ import { convertApplications } from "../api/utils"; type Status = "done" | "current" | "rejected" | "approved" | undefined; -export const IAM_SERVER = - "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC"; +export const IAM_SERVER = [ + "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC", + "did:ethr:0xd6f8d6ca86aa01e551a311d670a0d1bd8577e5fb", +]; const verifier = new PassportVerifierWithExpiration(); @@ -927,7 +929,9 @@ async function isVerified( application: GrantApplication | undefined ) { const vcHasValidProof = await verifier.verifyCredential(verifiableCredential); - const vcIssuedByValidIAMServer = verifiableCredential.issuer === IAM_SERVER; + const vcIssuedByValidIAMServer = IAM_SERVER.includes( + verifiableCredential.issuer + ); const providerMatchesProject = vcProviderMatchesProject( provider, verifiableCredential,