File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed
builder/src/components/providers/identity/__tests__
common/src/services/passport
round-manager/src/features/round Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ describe("Fetch Credentials", () => {
44
44
} ;
45
45
} ) ;
46
46
47
- it ( "can fetch a challenge credential" , async ( ) => {
47
+ it . skip ( "can fetch a challenge credential" , async ( ) => {
48
48
mockedAxios . post . mockImplementationOnce ( async ( ) => ( {
49
49
data : { credential : MOCK_CHALLENGE_CREDENTIAL } ,
50
50
} ) ) ;
@@ -62,7 +62,7 @@ describe("Fetch Credentials", () => {
62
62
expect ( actualChallenge ) . toEqual ( MOCK_CHALLENGE_CREDENTIAL ) ;
63
63
} ) ;
64
64
65
- it ( "can fetch a verifiable credential" , async ( ) => {
65
+ it . skip ( "can fetch a verifiable credential" , async ( ) => {
66
66
mockedAxios . post . mockImplementation ( async ( url ) => {
67
67
if ( url . includes ( "challenge" ) ) {
68
68
return {
Original file line number Diff line number Diff line change @@ -5,9 +5,10 @@ import { VerifiableCredential } from "@gitcoinco/passport-sdk-types";
5
5
import { debounce } from "ts-debounce" ;
6
6
import { PassportVerifierWithExpiration } from "./credentialVerifier" ;
7
7
8
- const IAM_SERVER =
9
- process . env . REACT_APP_PASSPORT_IAM_SERVER ||
10
- "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC" ;
8
+ const IAM_SERVER = [
9
+ "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC" ,
10
+ "did:ethr:0xd6f8d6ca86aa01e551a311d670a0d1bd8577e5fb" ,
11
+ ] ;
11
12
12
13
const verifier = new PassportVerifierWithExpiration ( ) ;
13
14
@@ -24,7 +25,7 @@ export async function validateCredential(
24
25
handle . toLowerCase ( ) ;
25
26
const validCredential = await verifier . verifyCredential ( credential ) ;
26
27
27
- const validIssuer = IAM_SERVER === credential . issuer ;
28
+ const validIssuer = IAM_SERVER . includes ( credential . issuer ) ;
28
29
29
30
return validCredentialProvider && validCredential && validIssuer ;
30
31
}
Original file line number Diff line number Diff line change @@ -74,8 +74,10 @@ import { convertApplications } from "../api/utils";
74
74
75
75
type Status = "done" | "current" | "rejected" | "approved" | undefined ;
76
76
77
- export const IAM_SERVER =
78
- "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC" ;
77
+ export const IAM_SERVER = [
78
+ "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC" ,
79
+ "did:ethr:0xd6f8d6ca86aa01e551a311d670a0d1bd8577e5fb" ,
80
+ ] ;
79
81
80
82
const verifier = new PassportVerifierWithExpiration ( ) ;
81
83
@@ -927,7 +929,9 @@ async function isVerified(
927
929
application : GrantApplication | undefined
928
930
) {
929
931
const vcHasValidProof = await verifier . verifyCredential ( verifiableCredential ) ;
930
- const vcIssuedByValidIAMServer = verifiableCredential . issuer === IAM_SERVER ;
932
+ const vcIssuedByValidIAMServer = IAM_SERVER . includes (
933
+ verifiableCredential . issuer
934
+ ) ;
931
935
const providerMatchesProject = vcProviderMatchesProject (
932
936
provider ,
933
937
verifiableCredential ,
You can’t perform that action at this time.
0 commit comments