-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vue,nuxt): Add Vue and Nuxt SDK docs (#1710)
Co-authored-by: victoria <[email protected]> Co-authored-by: Alexis Aguilar <[email protected]> Co-authored-by: Brad Cornes <[email protected]>
- Loading branch information
1 parent
e3bbf77
commit 0c43cde
Showing
24 changed files
with
1,543 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- [`useUser()`](/docs/references/vue/use-user) | ||
- [`useClerk()`](/docs/references/vue/use-clerk) | ||
- [`useAuth()`](/docs/references/vue/use-auth) | ||
- [`useSignIn()`](/docs/references/vue/use-sign-in) | ||
- [`useSignUp()`](/docs/references/vue/use-sign-up) | ||
- [`useSession()`](/docs/references/vue/use-session) | ||
- [`useSessionList()`](/docs/references/vue/use-session-list) | ||
- [`useOrganization()`](/docs/references/vue/use-organization) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
The `useAuth()` composable provides access to the current user's authentication state and methods to manage the active session. You can use this composable to protect [pages](/docs/references/nuxt/protect-pages). | ||
|
||
In the following example, the `isLoaded` property checks if Clerk has finished initializing and the `userId` property checks if the user is signed in. | ||
|
||
```vue {{ filename: 'pages/protected-page.vue' }} | ||
<script setup> | ||
const { userId, isLoaded } = useAuth() | ||
</script> | ||
<template> | ||
<div v-if="!isLoaded">Loading...</div> | ||
<div v-else-if="!userId">Sign in to access this page</div> | ||
<div v-else>Hello, {{ userId }}!</div> | ||
</template> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,7 +139,8 @@ | |
"user-dotted-circle", | ||
"vue", | ||
"x", | ||
"expo" | ||
"expo", | ||
"nuxt" | ||
] | ||
} | ||
} | ||
|
Oops, something went wrong.