Skip to content

Commit 33deff8

Browse files
authored
Merge pull request Expensify#89925 from Expensify/cristi_fp-send-authentication-attribute
[No QA] Send authentication attribute to Group-IB when set on session
2 parents b382d67 + 9437a9c commit 33deff8

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/libs/FraudProtection/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ function sendAccountAttributes() {
1414
setAttribute('email', cachedAccount?.primaryLogin ?? '', false, true);
1515
setAttribute('mfa', cachedAccount?.requiresTwoFactorAuth ? '2fa_enabled' : '2fa_disabled', false, true);
1616
setAttribute('is_validated', cachedAccount?.validated ? 'true' : 'false', false, true);
17+
setAttribute('authentication', cachedSession?.authMethod ?? '', false, true);
1718
}
1819

1920
function trySendToFraudProtection() {

src/types/onyx/Session.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ type Session = {
4848

4949
/** Timestamp of the session creation date */
5050
creationDate?: number;
51+
52+
/** How the user authenticated for the current session, forwarded to the fraud protection backend */
53+
authMethod?: string;
5154
};
5255

5356
export default Session;

0 commit comments

Comments
 (0)