Skip to content

Commit 4ee26f2

Browse files
committed
chore: Remove untrusted_first_factors
1 parent 72ddfdc commit 4ee26f2

File tree

6 files changed

+2
-12
lines changed

6 files changed

+2
-12
lines changed

.changeset/client-trust-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
'@clerk/expo': minor
55
---
66

7-
Added `client_trust_state` and `untrusted_first_factors` fields to Client and SignIn resources to support new fraud protection feature.
7+
Adds `client_trust_state` field to Client and SignIn resources to support new fraud protection feature.

packages/clerk-js/src/core/resources/SignIn.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ export class SignIn extends BaseResource implements SignInResource {
103103
private _status: SignInStatus | null = null;
104104
supportedIdentifiers: SignInIdentifier[] = [];
105105
supportedFirstFactors: SignInFirstFactor[] | null = [];
106-
untrustedFirstFactors: SignInFirstFactor[] | null = [];
107106
supportedSecondFactors: SignInSecondFactor[] | null = null;
108107
firstFactorVerification: VerificationResource = new Verification(null);
109108
secondFactorVerification: VerificationResource = new Verification(null);
@@ -528,7 +527,6 @@ export class SignIn extends BaseResource implements SignInResource {
528527
this.supportedIdentifiers = data.supported_identifiers;
529528
this.identifier = data.identifier;
530529
this.supportedFirstFactors = deepSnakeToCamel(data.supported_first_factors) as SignInFirstFactor[] | null;
531-
this.untrustedFirstFactors = deepSnakeToCamel(data.untrusted_first_factors) as SignInFirstFactor[] | null;
532530
this.supportedSecondFactors = deepSnakeToCamel(data.supported_second_factors) as SignInSecondFactor[] | null;
533531
this.firstFactorVerification = new Verification(data.first_factor_verification);
534532
this.secondFactorVerification = new Verification(data.second_factor_verification);
@@ -547,7 +545,6 @@ export class SignIn extends BaseResource implements SignInResource {
547545
status: this.status || null,
548546
supported_identifiers: this.supportedIdentifiers,
549547
supported_first_factors: deepCamelToSnake(this.supportedFirstFactors),
550-
untrusted_first_factors: deepCamelToSnake(this.untrustedFirstFactors),
551548
supported_second_factors: deepCamelToSnake(this.supportedSecondFactors),
552549
first_factor_verification: this.firstFactorVerification.__internal_toSnapshot(),
553550
second_factor_verification: this.secondFactorVerification.__internal_toSnapshot(),

packages/clerk-js/src/test/core-fixtures.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ export const createSignIn = (signInParams: Partial<SignInJSON> = {}, user: Parti
208208
object: 'sign_in',
209209
second_factor_verification: signInParams.second_factor_verification,
210210
supported_first_factors: signInParams.supported_first_factors,
211-
untrusted_first_factors: signInParams.untrusted_first_factors || [],
212211
supported_second_factors: signInParams.supported_second_factors,
213212
user_data: {
214213
first_name: user.first_name,

packages/expo/src/cache/dummy-data/client-resource.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ export const DUMMY_CLERK_CLIENT_RESOURCE = {
9292
status: null,
9393
supported_identifiers: [],
9494
supported_first_factors: [],
95-
untrusted_first_factors: [],
9695
supported_second_factors: null,
9796
first_factor_verification: {
9897
object: 'verification',

packages/types/src/signIn.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export interface SignInResource extends ClerkResource {
4141
*/
4242
supportedIdentifiers: SignInIdentifier[];
4343
supportedFirstFactors: SignInFirstFactor[] | null;
44-
untrustedFirstFactors: SignInFirstFactor[] | null;
4544
supportedSecondFactors: SignInSecondFactor[] | null;
4645
firstFactorVerification: VerificationResource;
4746
secondFactorVerification: VerificationResource;
@@ -102,7 +101,6 @@ export interface SignInJSON extends ClerkResourceJSON {
102101
identifier: string;
103102
user_data: UserDataJSON;
104103
supported_first_factors: SignInFirstFactorJSON[];
105-
untrusted_first_factors: SignInFirstFactorJSON[];
106104
supported_second_factors: SignInSecondFactorJSON[];
107105
first_factor_verification: VerificationJSON | null;
108106
second_factor_verification: VerificationJSON | null;

packages/types/src/snapshots.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ import type { UserSettingsJSON } from './userSettings';
3535
import type { Nullable, Override } from './utils';
3636

3737
export type SignInJSONSnapshot = Override<
38-
Nullable<
39-
SignInJSON,
40-
'status' | 'identifier' | 'supported_first_factors' | 'untrusted_first_factors' | 'supported_second_factors'
41-
>,
38+
Nullable<SignInJSON, 'status' | 'identifier' | 'supported_first_factors' | 'supported_second_factors'>,
4239
{
4340
first_factor_verification: VerificationJSONSnapshot;
4441
second_factor_verification: VerificationJSONSnapshot;

0 commit comments

Comments
 (0)