$authStore
The $authStore
store provides a convenient way to access the current auth state and helper methods for managing the active session.
$authStore.get()
returns
- Name
userId
- Type
string
- Description
The current user's ID.
- Name
sessionId
- Type
string
- Description
The current user's session ID.
- Name
orgId
- Type
string
- Description
The current user's active organization ID.
- Name
orgRole
- Type
string
- Description
The current user's active organization role.
- Name
orgSlug
- Type
string
- Description
The current user's active organization slug.
How to use the $authStore
store
The following example demonstrates how to use the $authStore
store to access the current auth state. It uses userId
to detect if the user is signed in.
Feedback
Last updated on