Skip to content

Commit a30a875

Browse files
authored
Remove FingerprintJS from all systems (#14362)
1 parent da014df commit a30a875

45 files changed

Lines changed: 85 additions & 717 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package-lock.json

Lines changed: 0 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/common/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"@audius/fetch-nft": "0.2.8",
3939
"@audius/fixed-decimal": "*",
4040
"@audius/sdk": "*",
41-
"@fingerprintjs/fingerprintjs-pro": "3.5.6",
4241
"@jup-ag/api": "6.0.48",
4342
"@metaplex-foundation/mpl-token-metadata": "2.5.2",
4443
"@optimizely/optimizely-sdk": "4.0.0",

packages/common/src/services/auth/authService.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export type AuthService = {
3131
signIn: (
3232
email: string,
3333
password: string,
34-
visitorId?: string,
3534
otp?: string
3635
) => Promise<SignInResponse>
3736
signOut: () => Promise<void>
@@ -65,14 +64,12 @@ export const createAuthService = ({
6564
const signIn = async (
6665
email: string,
6766
password: string,
68-
visitorId?: string,
6967
otp?: string
7068
) => {
7169
const wallet = await hedgehogInstance.login({
7270
email,
7371
username: email,
7472
password,
75-
visitorId,
7673
otp
7774
})
7875

packages/common/src/services/env.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ export type Env = {
3434
ETH_TOKEN_BRIDGE_ADDRESS: Nullable<string>
3535
EXPLORE_CONTENT_URL: string
3636
FCM_PUSH_PUBLIC_KEY: Nullable<string>
37-
FINGERPRINT_ENDPOINT: Nullable<string>
38-
FINGERPRINT_PUBLIC_API_KEY: Nullable<string>
3937
GA_HOSTNAME: string
4038
GA_MEASUREMENT_ID: string
4139
HCAPTCHA_BASE_URL: string

packages/common/src/services/fingerprint/FingerprintClient.ts

Lines changed: 0 additions & 61 deletions
This file was deleted.

packages/common/src/services/fingerprint/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/common/src/services/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ export * from './auth'
22
export * from './remote-config'
33
export * from './RandomImage'
44
export * from './audius-backend'
5-
export * from './fingerprint'
65
export * from './local-storage'
76
export * from './wallet-client'
87
export * from './env'

packages/common/src/store/storeContext.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { AudioPlayer } from '../services/audio-player'
1919
import { AudiusBackend } from '../services/audius-backend'
2020
import { Env } from '../services/env'
2121
import { Explore } from '../services/explore'
22-
import { FingerprintClient } from '../services/fingerprint'
2322
import { LocalStorage } from '../services/local-storage'
2423
import { FeatureFlags, RemoteConfigInstance } from '../services/remote-config'
2524
import { TrackDownload } from '../services/track-download'
@@ -53,7 +52,6 @@ export type CommonStoreContext = {
5352
getHostUrl: () => string
5453
remoteConfigInstance: RemoteConfigInstance
5554
audiusBackendInstance: AudiusBackend
56-
fingerprintClient: FingerprintClient<any>
5755
walletClient: WalletClient
5856
localStorage: LocalStorage
5957
isNativeMobile: boolean

packages/discovery-provider/plugins/pedalboard/apps/anti-abuse-oracle/src/actionLog.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'dotenv/config'
22

33
import postgres from 'postgres'
44
import fetch from 'cross-fetch'
5-
import { useEmailDeliverable, useFingerprintDeviceCount } from './identity'
5+
import { useEmailDeliverable } from './identity'
66

77
export const sql = postgres(process.env.audius_db_url || '')
88

@@ -157,8 +157,7 @@ export async function getUserNormalizedScore(userId: number, wallet: string) {
157157
// Convert values to numbers
158158
const shadowbanScore = Number(shadowban_score)
159159

160-
const numberOfUserWithFingerprint = (await useFingerprintDeviceCount(userId))!
161-
let overallScore = shadowbanScore - numberOfUserWithFingerprint
160+
let overallScore = shadowbanScore
162161

163162
const isEmailDeliverable = await useEmailDeliverable(wallet)
164163
if (!isEmailDeliverable) {
@@ -184,7 +183,6 @@ export async function getUserNormalizedScore(userId: number, wallet: string) {
184183
challengeCount: challenge_count,
185184
followingCount: following_count,
186185
chatBlockCount: chat_block_count,
187-
fingerprintCount: numberOfUserWithFingerprint,
188186
isAudiusImpersonator: is_audius_impersonator,
189187
hasProfilePicture: has_profile_picture,
190188
isEmailDeliverable,

packages/discovery-provider/plugins/pedalboard/apps/anti-abuse-oracle/src/identity.ts

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,6 @@ import postgres from 'postgres'
44

55
export const sql = postgres(process.env.IDENTITY_DB_URL || '')
66

7-
type FingerprintCount = {
8-
fingerprint: string
9-
userCount: number
10-
userIds: number[]
11-
}
12-
13-
export async function userFingerprints(userId: number) {
14-
const rows: FingerprintCount[] = await sql`
15-
select
16-
"visitorId" as "fingerprint",
17-
count(distinct "userId") as "userCount",
18-
array_agg("userId") as "userIds"
19-
from "Fingerprints"
20-
where "visitorId" in (
21-
select "visitorId" from "Fingerprints" where "userId" = ${userId}
22-
)
23-
group by 1 order by 2 desc limit 90;
24-
`
25-
26-
for (const row of rows) {
27-
row.userIds.sort()
28-
}
29-
30-
return rows
31-
}
32-
33-
export async function useFingerprintDeviceCount(userId: number) {
34-
const rows = await sql`
35-
SELECT
36-
MAX("userCount") AS "maxUserCount"
37-
FROM (
38-
SELECT
39-
"visitorId",
40-
COUNT(DISTINCT "userId") AS "userCount"
41-
FROM "Fingerprints"
42-
WHERE "visitorId" IN (
43-
SELECT "visitorId" FROM "Fingerprints" WHERE "userId" = ${userId}
44-
)
45-
GROUP BY "visitorId"
46-
) t;
47-
`
48-
return rows[0].maxUserCount ?? 0
49-
}
50-
517
export async function useEmailDeliverable(wallet: string) {
528
const rows = await sql`
539
select "isEmailDeliverable" from "Users" where "walletAddress" = ${wallet}

0 commit comments

Comments
 (0)