Skip to content

Commit

Permalink
chore(app, platforms): remove facebook friends provider (passportxyz#…
Browse files Browse the repository at this point in the history
…1268)

* chore(app, platforms): remove facebook friends provider

* chore(platforms, app): remove remaining references to facebookfriends
  • Loading branch information
Tim Schultz authored May 12, 2023
1 parent 75de126 commit cae689c
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 444 deletions.
4 changes: 0 additions & 4 deletions app/__test-fixtures__/contextTestHelpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ export const makeTestCeramicContext = (initialState?: Partial<CeramicContextStat
providerSpec: getProviderSpec("Facebook", "Facebook"),
stamp: undefined,
},
FacebookFriends: {
providerSpec: getProviderSpec("Facebook", "FacebookFriends"),
stamp: undefined,
},
FacebookProfilePicture: {
providerSpec: getProviderSpec("Facebook", "FacebookProfilePicture"),
stamp: undefined,
Expand Down
1 change: 0 additions & 1 deletion app/__tests__/components/ExpiredStampModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ describe("ExpiredStampModal", () => {
expect(handleDeleteStamps).toHaveBeenCalledWith([
"Ens",
"Facebook",
"FacebookFriends",
"FacebookProfilePicture",
"Github",
"FiveOrMoreGithubRepos",
Expand Down
4 changes: 0 additions & 4 deletions app/config/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ export const STAMP_PROVIDERS: Readonly<Providers> = {
platformGroup: "Account Name",
providers: [{ title: "Encrypted", name: "Facebook" }],
},
{
platformGroup: "Friends",
providers: [{ title: "Greater than 100", name: "FacebookFriends" }],
},
{
platformGroup: "Profile",
providers: [{ title: "Profile Picture attached", name: "FacebookProfilePicture" }],
Expand Down
4 changes: 0 additions & 4 deletions app/context/ceramicContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,6 @@ const startingAllProvidersState: AllProvidersState = {
providerSpec: getProviderSpec("Facebook", "Facebook"),
stamp: undefined,
},
FacebookFriends: {
providerSpec: getProviderSpec("Facebook", "FacebookFriends"),
stamp: undefined,
},
FacebookProfilePicture: {
providerSpec: getProviderSpec("Facebook", "FacebookProfilePicture"),
stamp: undefined,
Expand Down
4 changes: 0 additions & 4 deletions platforms/src/Facebook/Providers-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ export const FacebookProviderConfig: PlatformGroupSpec[] = [
platformGroup: "Account Name",
providers: [{ title: "Encrypted", name: "Facebook" }],
},
{
platformGroup: "Friends",
providers: [{ title: "Greater than 100", name: "FacebookFriends" }],
},
{
platformGroup: "Profile",
providers: [{ title: "Profile Picture attached", name: "FacebookProfilePicture" }],
Expand Down
93 changes: 0 additions & 93 deletions platforms/src/Facebook/Providers/facebookFriends.ts

This file was deleted.

4 changes: 2 additions & 2 deletions platforms/src/Facebook/Providers/facebookProfilePicture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class FacebookProfilePictureProvider implements Provider {
notExpired && formattedData.app_id === APP_ID && formattedData.is_valid && !!formattedData.user_id;

// Get the FB profile
const profileResponseData = await verifyFacebookFriends(payload.proofs.accessToken);
const profileResponseData = await verifyFacebookProfilePic(payload.proofs.accessToken);

if (profileResponseData.status != 200) {
// The exception handle will catch that ...
Expand Down Expand Up @@ -89,7 +89,7 @@ export class FacebookProfilePictureProvider implements Provider {
}
}

async function verifyFacebookFriends(userAccessToken: string): Promise<Response> {
async function verifyFacebookProfilePic(userAccessToken: string): Promise<Response> {
// see https://developers.facebook.com/docs/graph-api/reference/user/
return axios.get("https://graph.facebook.com/me/", {
headers: { "User-Agent": "Facebook Graph Client" },
Expand Down
Loading

0 comments on commit cae689c

Please sign in to comment.