Skip to content

Commit e81d45b

Browse files
authoredOct 16, 2024··
chore(clerk-js,types): Drop maxAgeMinutes from __experimental_startVerification (#4338)
1 parent 7f959a9 commit e81d45b

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed
 

‎.changeset/fluffy-goats-protect.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@clerk/clerk-js": minor
3+
"@clerk/types": minor
4+
---
5+
6+
Drop `maxAgeMinutes` from `__experimental_startVerification`.
7+
Drop types `__experimental_SessionVerificationConfig` and `__experimental_SessionVerificationMaxAgeMinutes`.

‎packages/clerk-js/src/core/resources/Session.ts

-2
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,13 @@ export class Session extends BaseResource implements SessionResource {
122122

123123
__experimental_startVerification = async ({
124124
level,
125-
maxAgeMinutes,
126125
}: __experimental_SessionVerifyCreateParams): Promise<__experimental_SessionVerificationResource> => {
127126
const json = (
128127
await BaseResource._fetch({
129128
method: 'POST',
130129
path: `/client/sessions/${this.id}/verify`,
131130
body: {
132131
level,
133-
maxAgeMinutes,
134132
} as any,
135133
})
136134
)?.response as unknown as __experimental_SessionVerificationJSON;

‎packages/types/src/session.ts

-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import type { ClerkResource } from './resource';
1818
import type {
1919
__experimental_ReverificationConfig,
2020
__experimental_SessionVerificationLevel,
21-
__experimental_SessionVerificationMaxAgeMinutes,
2221
__experimental_SessionVerificationResource,
2322
} from './sessionVerification';
2423
import type { TokenResource } from './token';
@@ -155,7 +154,6 @@ export type GetToken = (options?: GetTokenOptions) => Promise<string | null>;
155154

156155
export type __experimental_SessionVerifyCreateParams = {
157156
level: __experimental_SessionVerificationLevel;
158-
maxAgeMinutes: __experimental_SessionVerificationMaxAgeMinutes;
159157
};
160158

161159
export type __experimental_SessionVerifyPrepareFirstFactorParams = EmailCodeConfig | PhoneCodeConfig;

‎packages/types/src/sessionVerification.ts

+2-9
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,15 @@ export type __experimental_SessionVerificationStatus = 'needs_first_factor' | 'n
1717

1818
export type __experimental_SessionVerificationTypes = 'veryStrict' | 'strict' | 'moderate' | 'lax';
1919

20-
export type __experimental_SessionVerificationConfig =
21-
| __experimental_SessionVerificationTypes
22-
| {
23-
level: __experimental_SessionVerificationLevel;
24-
maxAgeMinutes: __experimental_SessionVerificationMaxAgeMinutes;
25-
};
26-
2720
export type __experimental_ReverificationConfig =
2821
| __experimental_SessionVerificationTypes
2922
| {
3023
level: __experimental_SessionVerificationLevel;
31-
afterMinutes: __experimental_SessionVerificationMaxAgeMinutes;
24+
afterMinutes: __experimental_SessionVerificationAfterMinutes;
3225
};
3326

3427
export type __experimental_SessionVerificationLevel = 'firstFactor' | 'secondFactor' | 'multiFactor';
35-
export type __experimental_SessionVerificationMaxAgeMinutes = number;
28+
export type __experimental_SessionVerificationAfterMinutes = number;
3629

3730
export type __experimental_SessionVerificationFirstFactor = EmailCodeFactor | PhoneCodeFactor | PasswordFactor;
3831
export type __experimental_SessionVerificationSecondFactor = PhoneCodeFactor | TOTPFactor | BackupCodeFactor;

0 commit comments

Comments
 (0)
Please sign in to comment.