Skip to content

Commit bc07bf3

Browse files
committed
Update changeset
1 parent d952599 commit bc07bf3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.changeset/sixty-carpets-stare.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
---
2-
'@clerk/astro': patch
2+
'@clerk/astro': minor
33
---
44

55
Introduce `treatPendingAsSignedOut` option to `getAuth` and `auth` from `clerkMiddleware`
66

7+
By default, `treatPendingAsSignedOut` is set to `true`, which means pending sessions are treated as signed-out. You can set this option to `false` to treat pending sessions as authenticated.
8+
9+
```ts
10+
// `pending` sessions will be treated as signed-out by default
11+
const { userId } = getAuth(req, locals, { treatPendingAsSignedOut: false })
12+
```
13+
714
```ts
15+
// Both `active` and `pending` sessions will be treated as authenticated when `treatPendingAsSignedOut` is false
816
const { userId } = getAuth(req, locals, { treatPendingAsSignedOut: false })
917
```
1018

0 commit comments

Comments
 (0)