Skip to content

Commit

Permalink
(chore) align react and vue docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisintech committed Dec 20, 2024
1 parent 757a341 commit c1da1cd
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 86 deletions.
2 changes: 1 addition & 1 deletion docs/references/javascript/clerk/session-methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function setActive({ session, organization, beforeEmit }: SetActiveParams): Prom
- `beforeEmit?`
- `(session?: Session | null) => void | Promise<any>`

Callback run just before the active session and/or organization is set to the passed object. Can be used to hook up for pre-navigation actions.
Callback run just before the active session and/or organization is set to the passed object. Can be used to set up for pre-navigation actions.
</Properties>

### Example
Expand Down
8 changes: 4 additions & 4 deletions docs/references/javascript/sign-in/sign-in.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ The following steps outline the sign-in process:

The current status of the sign-in. `SignInStatus` supports the following values:

- `needs_identifier`: The authentication identifier hasn't been provided.
- `needs_first_factor`: First factor verification for the provided identifier needs to be prepared and verified. See [First Factor](/docs/references/javascript/sign-in/first-factor) for details.
- `needs_second_factor`: Second factor verification (2FA) for the provided identifier needs to be prepared and verified. See [Second Factor](/docs/references/javascript/sign-in/second-factor) for details.
- `complete`: The user is signed in and the custom flow can proceed to `setActive()` to create a session.
- `needs_identifier`: The user's identifier (e.g., email address, phone number, username) hasn't been provided.
- `needs_first_factor`: One of the following [first factor verification strategies](/docs/references/javascript/sign-in/first-factor) is missing: `email_link`, `email_code`, `phone_code`, `web3_metamask_signature`, `web3_coinbase_wallet_signature` or `oauth_provider`.
- `needs_second_factor`: One of the following [second factor verification strategies](/docs/references/javascript/sign-in/second-factor) is missing: `phone_code` or `totp`.
- `needs_new_password`: The user needs to set a new password.
- `complete`: The sign-in is complete and the user is authenticated.

---

Expand Down
6 changes: 3 additions & 3 deletions docs/references/javascript/sign-up/sign-up.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ The following steps outline the sign-up process:

The status of the current sign-up. The following values are supported:

- `missing_requirements:` There are required fields that are either missing or they are unverified.
- `complete:` All the required fields have been supplied and verified, so the sign-up is complete and a new user and a session have been created.
- `abandoned:` The sign-up has been inactive for a long period of time, thus it's considered as abandoned and need to start over.
- `complete:` The user has been created and the custom flow can proceed to `setActive()` to create session.
- `missing_requirements:` A requirement is unverified or missing from the [**Email, Phone, Username**](https://dashboard.clerk.com/last-active?path=user-authentication/email-phone-username) settings. For example, in the Clerk Dashboard, the **Password** setting is required but a password wasn't provided in the custom flow.
- `abandoned:` The sign-up has been inactive for over 24 hours.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/references/react/use-auth.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: '`useAuth()`'
title: useAuth()
description: Access and manage authentication state in your React application with Clerk's useAuth() hook.
---

Expand Down
2 changes: 1 addition & 1 deletion docs/references/react/use-clerk.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: '`useClerk()`'
title: useClerk()
description: Access and manage the Clerk object in your React application with Clerk's useClerk() hook.
---

Expand Down
4 changes: 2 additions & 2 deletions docs/references/react/use-organization-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ type OrganizationInvitationStatus = 'pending' | 'accepted' | 'revoked'
type OrganizationSuggestionStatus = 'pending' | 'accepted'
```
## `useOrganizationList()` returns
## Returns
<Properties>
- `isLoaded`
Expand Down Expand Up @@ -158,7 +158,7 @@ type OrganizationSuggestionStatus = 'pending' | 'accepted'
- `beforeEmit?`
- `(session?: Session | null) => void | Promise<any>`
Callback run just before the active session and/or organization is set to the passed object. Can be used to hook up for pre-navigation actions.
Callback run just before the active session and/or organization is set to the passed object. Can be used to set up for pre-navigation actions.
</Properties>
### `PaginatedResources`
Expand Down
2 changes: 1 addition & 1 deletion docs/references/react/use-organization.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: '`useOrganization()`'
title: useOrganization()
description: Access and manage the currently active organization in your React application with Clerk's useOrganization() hook.
---

Expand Down
2 changes: 1 addition & 1 deletion docs/references/react/use-reverification.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: '`useReverification()`'
title: useReverification()
description: Clerk's useReverification() hook enhances a fetcher function to handle a session's reverification flow.
---

Expand Down
4 changes: 2 additions & 2 deletions docs/references/react/use-session-list.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: '`useSessionList()`'
title: useSessionList()
description: Access and manage the current user's session list in your React application with Clerk's useSessionList() hook.
---

Expand Down Expand Up @@ -48,7 +48,7 @@ The `useSessionList()` hook returns an array of [`Session`](/docs/references/jav
- `beforeEmit?`
- `(session?: Session | null) => void | Promise<any>`

Callback run just before the active session and/or organization is set to the passed object. Can be used to hook up for pre-navigation actions.
Callback run just before the active session and/or organization is set to the passed object. Can be used to set up for pre-navigation actions.
</Properties>

## How to use the `useSessionList()` hook
Expand Down
2 changes: 1 addition & 1 deletion docs/references/react/use-session.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: '`useSession()`'
title: useSession()
description: Access and manage the current user's session in your React application with Clerk's useSession() hook.
---

Expand Down
43 changes: 2 additions & 41 deletions docs/references/react/use-sign-in.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: '`useSignIn()`'
title: useSignIn()
description: Access and manage the current user's sign-in state in your React application with Clerk's useSignIn() hook.
---

Expand Down Expand Up @@ -48,7 +48,7 @@ The `useSignIn()` hook provides access to the [`SignIn`](/docs/references/javasc
- `beforeEmit?`
- `(session?: Session | null) => void | Promise<any>`

Callback run just before the active session and/or organization is set to the passed object. Can be used to hook up for pre-navigation actions.
Callback run just before the active session and/or organization is set to the passed object. Can be used to set up for pre-navigation actions.
</Properties>

## How to use the `useSignIn()` hook
Expand All @@ -72,45 +72,6 @@ export default function SignInPage() {
}
```

### `SignIn` status values

The `status` property of the `SignIn` object can be one of the following values:

<Properties>
- `complete`
- `string`

The user has been signed in and the custom flow can proceed to `setActive()` to create a session.

---

- `needs_first_factor`
- `string`

One of the following [first factor verification strategies](/docs/references/javascript/sign-in/first-factor) is missing: `email_link`, `email_code`, `phone_code`, `web3_metamask_signature`, `web3_coinbase_wallet_signature` or `oauth_provider`.

---

- `needs_second_factor`
- `string`

One of the following [second factor verification strategies](/docs/references/javascript/sign-in/second-factor) is missing: `phone_code` or `totp`.

---

- `needs_identifier`
- `string`

The user's [identifier](/docs/authentication/configuration/sign-up-sign-in-options#identifiers) (e.g., email address, phone number, username) is missing.

---

- `needs_new_password`
- `string`

The user needs to set a new password.
</Properties>

### Create a custom sign-in flow with `useSignIn()`

The `useSignIn()` hook can also be used to build fully custom sign-in flows, if Clerk's prebuilt components don't meet your specific needs or if you require more control over the authentication flow. Different sign-in flows include email and password, email and phone codes, email links, and multifactor (MFA). To learn more about using the `useSignIn()` hook to create custom flows, see the [custom flow guides](/docs/custom-flows/overview).
29 changes: 2 additions & 27 deletions docs/references/react/use-sign-up.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: '`useSignUp()`'
title: useSignUp()
description: Access and manage the current user's sign-up state in your React application with Clerk's useSignUp() hook.
---

Expand Down Expand Up @@ -48,7 +48,7 @@ The `useSignUp()` hook provides access to the [`SignUp`](/docs/references/javasc
- `beforeEmit?`
- `(session?: Session | null) => void | Promise<any>`

Callback run just before the active session and/or organization is set to the passed object. Can be used to hook up for pre-navigation actions.
Callback run just before the active session and/or organization is set to the passed object. Can be used to set up for pre-navigation actions.
</Properties>

## How to use the `useSignUp()` hook
Expand All @@ -72,31 +72,6 @@ export default function SignUpPage() {
}
```

### `SignUp` status values

The `status` property of the `SignUp` object can be one of the following values:

<Properties>
- `complete`
- `string`

The user has been created and the custom flow can proceed to `setActive()` to create a session.

---

- `abandoned`
- `string`

The sign-up attempt will be abandoned if it was started more than 24 hours previously.

---

- `missing_requirements`
- `string`

A requirement is missing from the [Email, Phone, Username](https://dashboard.clerk.com/last-active?path=user-authentication/email-phone-username) settings. For example, in the Clerk Dashboard, the **Password** setting is required but a password wasn't provided in the custom flow.
</Properties>

### Create a custom sign-up flow with `useSignUp()`

The `useSignUp()` hook can also be used to build fully custom sign-up flows, if Clerk's prebuilt components don't meet your specific needs or if you require more control over the authentication flow. Different sign-up flows include email and password, email and phone codes, email links, and multifactor (MFA). To learn more about using the `useSignUp()` hook to create custom flows, see the [custom flow guides](/docs/custom-flows/overview).
2 changes: 1 addition & 1 deletion docs/references/react/use-user.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: '`useUser()`'
title: useUser()
description: Access and manage the current user's data in your React application with Clerk's useUser() hook.
---

Expand Down

0 comments on commit c1da1cd

Please sign in to comment.