Skip to content

Commit fe9e147

Browse files
authored
feat(repo): Transition Session Reverification to stable (clerk#4536)
1 parent 4da28fa commit fe9e147

110 files changed

Lines changed: 2373 additions & 2335 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.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@clerk/nextjs': minor
3+
---
4+
5+
Introduce the `useReverification()` hook that handles the session reverification flow:
6+
- Replaces `__experimental_useReverification` with `useReverification`
7+
Also replaces the following APIs:
8+
- `____experimental_reverificationError` -> `__reverificationError`
9+
- `__experimental_reverificationErrorResponse` -> `reverificationErrorResponse`

.changeset/curly-terms-confess.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@clerk/chrome-extension': patch
3+
---
4+
5+
Introduce the `useReverification()` hook that handles the session reverification flow:
6+
- Replaces `__experimental_useReverification` with `useReverification`
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@clerk/shared': minor
3+
---
4+
5+
Introduce the `useReverification()` hook that handles the session reverification flow:
6+
- `__experimental_useReverification` -> `useReverification`
7+
Also replaces the following APIs:
8+
- `__experimental_reverificationError` -> `reverificationError`
9+
- `__experimental_reverificationErrorResponse` -> `reverificationErrorResponse`
10+
- `__experimental_isReverificationHint` -> `isReverificationHint`

.changeset/friendly-chairs-tie.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
'@clerk/types': minor
3+
---
4+
5+
Drop experimental tag related to reverification.
6+
7+
Properties of Clerk class:
8+
- `__experimental_openUserVerification` -> `__internal_openUserVerification`
9+
- `__experimental_closeUserVerification` -> `__internal_closeUserVerification`
10+
- `__experimental_UserVerificationProps` -> `__internal_UserVerificationProps`
11+
- `__experimental_UserVerificationModalProps` -> `__internal_UserVerificationModalProps`
12+
13+
Properties of `Session`:
14+
- `__experimental_factorVerificationAge` -> `factorVerificationAge`
15+
- `__experimental_startVerification` -> `startVerification`
16+
- `__experimental_prepareFirstFactorVerification` -> `prepareFirstFactorVerification`
17+
- `__experimental_attemptFirstFactorVerification` -> `attemptFirstFactorVerification`
18+
- `__experimental_prepareSecondFactorVerification` -> `prepareSecondFactorVerification`
19+
- `__experimental_attemptSecondFactorVerification` -> `attemptSecondFactorVerification`
20+
21+
Renaming
22+
- `__experimental_SessionVerificationResource` -> `SessionVerificationResource`
23+
- `__experimental_SessionVerificationStatus` -> `SessionVerificationStatus`
24+
- `__experimental_SessionVerificationLevel` -> `SessionVerificationLevel`
25+
- `__experimental_ReverificationConfig` -> `ReverificationConfig`
26+
27+
`CheckAuthorizationParamsWithCustomPermissions` and `CheckAuthorizationParams` now include `reverification?: ReverificationConfig;`
28+
29+
Properties of `IntialState`:
30+
- `__experimental_factorVerificationAge` -> `factorVerificationAge`
31+
32+
Localization types:
33+
All properties of `__experimental_userVerification` are moved to `userVerification`

.changeset/happy-balloons-jog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@clerk/clerk-react': minor
3+
---
4+
5+
Introduce the `useReverification()` hook that handles the session reverification flow:
6+
- Replaces `__experimental_useReverification` with `useReverification`

.changeset/hungry-beds-prove.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@clerk/clerk-js': minor
3+
---
4+
5+
Drop experimental tag related to reverification.
6+
7+
Properties of Clerk class:
8+
- `__experimental_openUserVerification` -> `__internal_openUserVerification`
9+
- `__experimental_closeUserVerification` -> `__internal_closeUserVerification`
10+
- `__experimental_UserVerificationProps` -> `__internal_UserVerificationProps`
11+
- `__experimental_UserVerificationModalProps` -> `__internal_UserVerificationModalProps`
12+
13+
Properties of `Session`:
14+
- `__experimental_factorVerificationAge` -> `factorVerificationAge`
15+
- `__experimental_startVerification` -> `startVerification`
16+
- `__experimental_prepareFirstFactorVerification` -> `prepareFirstFactorVerification`
17+
- `__experimental_attemptFirstFactorVerification` -> `attemptFirstFactorVerification`
18+
- `__experimental_prepareSecondFactorVerification` -> `prepareSecondFactorVerification`
19+
- `__experimental_attemptSecondFactorVerification` -> `attemptSecondFactorVerification`

.changeset/small-suits-knock.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/localizations': minor
3+
---
4+
5+
Moves all properties under `__experimental_userVerification` to `userVerification`. This affects all languages.

.changeset/smart-cooks-drop.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@clerk/backend': minor
3+
---
4+
5+
Update AuthObject property from `__experimental_factorVerificationAge` to `factorVerificationAge`.
6+
Also replaces the following APIs:
7+
- `__experimental_reverificationError` -> `__reverificationError`
8+
- `__experimental_reverificationErrorResponse` -> `reverificationErrorResponse`

integration/templates/next-app-router/src/app/(reverification)/action-with-use-reverification/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22
import { useState, useTransition } from 'react';
3-
import { __experimental_useReverification as useReverification } from '@clerk/nextjs';
3+
import { useReverification } from '@clerk/nextjs';
44
import { logUserIdActionReverification } from '@/app/(reverification)/actions';
55

66
function Page() {

integration/templates/next-app-router/src/app/(reverification)/actions.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
'use server';
22

3-
import { auth } from '@clerk/nextjs/server';
4-
import { __experimental_reverificationError as reverificationError } from '@clerk/shared/authorization-errors';
5-
import { __experimental_ReverificationConfig } from '@clerk/types';
6-
3+
import { auth, reverificationError } from '@clerk/nextjs/server';
4+
import { ReverificationConfig } from '@clerk/types';
75
const logUserIdActionReverification = async () => {
86
const { userId, has } = await auth.protect();
97

108
const config = {
119
level: 'second_factor',
1210
afterMinutes: 1,
13-
} satisfies __experimental_ReverificationConfig;
11+
} satisfies ReverificationConfig;
1412

1513
const userNeedsReverification = !has({
16-
__experimental_reverification: config,
14+
reverification: config,
1715
});
1816

1917
if (userNeedsReverification) {

0 commit comments

Comments
 (0)