Skip to content

fix: twitter verification #3772

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

Merged
merged 4 commits into from
Feb 25, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
IssuedChallenge,
VerifiableCredentialRecord,
} from "@gitcoinco/passport-sdk-types";
import { CredentialProvider } from "../../../types";

export type { VerifiableCredential } from "@gitcoinco/passport-sdk-types";

Expand Down Expand Up @@ -37,6 +38,8 @@ export enum ClientType {
}

export type GHOrgRequestPayload = RequestPayload & {
type: string;
types: CredentialProvider[];
requestedClient?: ClientType.GrantHub;
org?: string;
};
Expand All @@ -51,7 +54,7 @@ export class VerificationError extends Error {
// Fetch a verifiableCredential
export const fetchVerifiableCredential = async (
iamUrl: string,
payload: any,
payload: GHOrgRequestPayload,
signer: { signMessage: (message: string) => Promise<string> }
): Promise<VerifiableCredentialRecord> => {
// first pull a challenge that can be signed by the user
Expand Down Expand Up @@ -86,8 +89,8 @@ export const fetchVerifiableCredential = async (
return {
signature,
challenge,
record: response?.data.record,
credential: response?.data.credential,
record: response?.data[0].record,
credential: response?.data[0].credential,
} as VerifiableCredentialRecord;
};

Expand Down
Loading