Skip to content

Commit 0ed854c

Browse files
Update Clerk.session description to not mention active status (#2597)
Co-authored-by: Alexis Aguilar <[email protected]>
1 parent 2d0b5d3 commit 0ed854c

28 files changed

+49
-48
lines changed

docs/_partials/hooks/use-auth.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{/* TODO: Keep in sync with /tanstack-react-start/read-session-data and /expo/read-session-user-data */}
22

3-
The following example uses the [`useAuth()`](/docs/reference/hooks/use-auth) hook to access the current auth state, as well as helper methods to manage the current active session. The following example demonstrates how to use the available properties of the `useAuth()` hook.
3+
The following example uses the [`useAuth()`](/docs/reference/hooks/use-auth) hook to access the current auth state, as well as helper methods to manage the current session.
44

55
```tsx {{ filename: 'example.tsx' }}
66
export default function Example() {

docs/_partials/nextjs/next-steps.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
---
1616

1717
- [Read user and session data](/docs/nextjs/guides/users/reading)
18-
- Learn how to use Clerk's hooks and helpers to access the active session and user data in your Next.js app.
18+
- Learn how to use Clerk's hooks and helpers to access the session and user data in your Next.js app.
1919

2020
---
2121

docs/getting-started/quickstart.astro.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ sdk: astro
201201
---
202202

203203
- [Read session and user data](/docs/astro/guides/users/reading)
204-
- Learn how to use Clerk's stores and helpers to access the active session and user data in your Astro app.
204+
- Learn how to use Clerk's stores and helpers to access the session and user data in your Astro app.
205205

206206
---
207207

docs/getting-started/quickstart.nuxt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Learn more about Clerk components, how to customize them, and how to use Clerk's
149149
---
150150

151151
- [Read session and user data](/docs/nuxt/guides/users/reading)
152-
- Learn how to use Clerk's composables and helpers to access the active session and user data in your Nuxt app.
152+
- Learn how to use Clerk's composables and helpers to access the session and user data in your Nuxt app.
153153

154154
---
155155

docs/getting-started/quickstart.react-router.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ This tutorial assumes that you're using React Router **v7.1.2 or later** in fram
229229
---
230230

231231
- [Read session and user data](/docs/react-router/guides/users/reading)
232-
- Learn how to use Clerk's hooks and helpers to access the active session and user data in your React Router app.
232+
- Learn how to use Clerk's hooks and helpers to access the session and user data in your React Router app.
233233

234234
---
235235

docs/getting-started/quickstart.remix.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Learn how to use Clerk to quickly and easily add secure authentication and user
275275
---
276276

277277
- [Read user and session data](/docs/remix/guides/users/reading)
278-
- Learn how to use Clerk's hooks and helpers to access the active session and user data in your Remix app.
278+
- Learn how to use Clerk's hooks and helpers to access the session and user data in your Remix app.
279279

280280
---
281281

docs/getting-started/quickstart.tanstack-react-start.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ sdk: tanstack-react-start
252252
---
253253

254254
- [Read user and session data](/docs/tanstack-react-start/guides/users/reading)
255-
- Learn how to use Clerk's hooks and helpers to access the active session and user data in your TanStack React Start app.
255+
- Learn how to use Clerk's hooks and helpers to access the session and user data in your TanStack React Start app.
256256

257257
---
258258

docs/getting-started/quickstart.vue.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ This tutorial assumes that you're using [Vue 3](https://vuejs.org/) with [TypeSc
9898

9999
### Add `clerkPlugin` to your app
100100

101-
`clerkPlugin` provides active session and user context to Clerk's components and composables. It's required to pass your Clerk Publishable Key as an option. You can add an `if` statement to check that the key is imported properly. This prevents the app from running without the Publishable Key and catches TypeScript errors.
101+
`clerkPlugin` provides session and user context to Clerk's components and composables. It's required to pass your Clerk Publishable Key as an option. You can add an `if` statement to check that the key is imported properly. This prevents the app from running without the Publishable Key and catches TypeScript errors.
102102

103103
The `clerkPlugin` accepts optional options, such as `{ signInForceRedirectUrl: '/dashboard' }`. See the [reference documentation](/docs/reference/vue/clerk-plugin) for more information.
104104

docs/guides/development/custom-flows/authentication/multi-session-applications.mdx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,30 @@ To enable multi-session in your application, you need to configure it in the Cle
2424
1. Toggle on **Multi-session handling**.
2525
1. Select **Save changes**.
2626

27-
## Get the active session and user
27+
## Get the session and user
2828

2929
<CodeBlockTabs options={["React", "JavaScript", "iOS"]}>
3030
```jsx
3131
import { useClerk } from '@clerk/clerk-react'
3232

33-
// Get the active session and user
33+
// Get the session and user
3434
const { session, user } = useClerk()
3535
```
3636

3737
```js
38-
// Get the active session
39-
const activeSession = window.Clerk.session
38+
// Get the session
39+
const currentSession = window.Clerk.session
4040

41-
// Get the active user
42-
const activeUser = window.Clerk.user
41+
// Get the user
42+
const currentUser = window.Clerk.user
4343
```
4444

4545
```swift
46-
// Get the active session
47-
var activeSession: Session? { Clerk.shared.session }
46+
// Get the current session
47+
var currentSession: Session? { Clerk.shared.session }
4848

49-
// Get the active user
50-
var user: User? { Clerk.shared.user }
49+
// Get the current user
50+
var currentUser: User? { Clerk.shared.user }
5151
```
5252
</CodeBlockTabs>
5353

@@ -63,7 +63,7 @@ To enable multi-session in your application, you need to configure it in the Cle
6363
const availableSessions = client.sessions
6464
const currentSession = availableSessions[0].id
6565

66-
// Use setActive to set the current session.
66+
// Use setActive() to set the session as active
6767
await setActive({
6868
session: currentSession.id,
6969
navigate: async ({ session }) => {
@@ -83,7 +83,7 @@ To enable multi-session in your application, you need to configure it in the Cle
8383
// You can get all the available sessions through the client
8484
const availableSessions = window.Clerk.client.sessions
8585

86-
// Use setActive to set the active session.
86+
// Use setActive() to set the session as active
8787
await window.Clerk.setActive({
8888
session: availableSessions[0].id,
8989
navigate: async ({ session }) => {
@@ -103,7 +103,7 @@ To enable multi-session in your application, you need to configure it in the Cle
103103
// You can get all the available sessions through the client
104104
var availableSessions: [Session] { Clerk.shared.client?.sessions ?? [] }
105105

106-
// Use setActive to set the active session.
106+
// Use setActive() to set the session as active
107107
try await Clerk.shared.setActive(sessionId: session.id)
108108
```
109109
</CodeBlockTabs>
@@ -159,11 +159,11 @@ Use [`signOut()`](/docs/reference/javascript/clerk#sign-out) to deactivate a spe
159159
```
160160
161161
```js
162-
// Get the active session
163-
const activeSession = window.Clerk.session
162+
// Get the current session
163+
const currentSession = window.Clerk.session
164164

165165
// Use signOut to sign-out the active session
166-
await window.Clerk.signOut(activeSession.id)
166+
await window.Clerk.signOut(currentSession.id)
167167
```
168168
169169
```swift

docs/guides/development/custom-sign-in-or-up-page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ To set up separate sign-in and sign-up pages, follow this guide, and then follow
103103
---
104104

105105
- [Read user and session data](/docs/nextjs/guides/users/reading)
106-
- Learn how to use Clerk's hooks and helpers to access the active session and user data in your Next.js application.
106+
- Learn how to use Clerk's hooks and helpers to access the session and user data in your Next.js application.
107107

108108
---
109109

0 commit comments

Comments
 (0)