Skip to content

Commit c00fd88

Browse files
committed
Add changeset
1 parent fe79832 commit c00fd88

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.changeset/tricky-planets-cry.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@clerk/nextjs': patch
3+
---
4+
5+
Propagate `treatPendingAsSignedOut` to `auth` from `clerkMiddleware`
6+
7+
```ts
8+
export default clerkMiddleware((auth, req) => {
9+
// If the session has a `pending` status, `userId` will be `null` by default, treated as a signed-out state
10+
const { userId } = await auth()
11+
})
12+
```
13+
14+
```ts
15+
export default clerkMiddleware((auth, req) => {
16+
// If the session has a `pending` status, `userId` will be defined, treated as a signed-in state
17+
const { userId } = await auth({ treatPendingAsSignedOut: false })
18+
})
19+
```

0 commit comments

Comments
 (0)