Skip to content

Commit

Permalink
v5 javascript updates (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisintech committed Mar 27, 2024
1 parent c8ba866 commit 1f8267d
Show file tree
Hide file tree
Showing 17 changed files with 393 additions and 181 deletions.
2 changes: 1 addition & 1 deletion docs/custom-flows/oauth-connections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ To initiate an OAuth flow for a user that is already signed in, you can use the

```jsx
user
.createExternalAccount({ strategy: strategy, redirect_url: 'your-redirect-url' })
.createExternalAccount({ strategy: strategy, redirectUrl: 'your-redirect-url' })
.then(externalAccount => {
// navigate to
// externalAccount.verification!.externalVerificationRedirectURL
Expand Down
2 changes: 1 addition & 1 deletion docs/custom-flows/saml-connections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ To initiate a SAMLflow for a user that is already signed in, you can use the [`u

```jsx
user
.createExternalAccount({ strategy: strategy, redirect_url: 'your-redirect-url' })
.createExternalAccount({ strategy: strategy, redirectUrl: 'your-redirect-url' })
.then(externalAccount => {
// navigate to
// externalAccount.verification!.externalVerificationRedirectURL
Expand Down
2 changes: 1 addition & 1 deletion docs/organizations/creating-organizations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The simplest way to create an organization is to use Clerk's `<CreateOrganizatio

## Create an organization using the `createOrganization()` method

If you would like to create an organization programmatically, you can use the `createOrganization()` method. In React and Next.js applications, you can access the `createOrganization` method via the [`useOrganizationList()`](/docs/references/react/use-organization-list) hook. In JavaScript applications, the same method is available directly on the [`Clerk` object](/docs/references/javascript/clerk/organization-methods#create-organization). The `createOrganization` method can also be accessed through the [Backend SDK](/docs/references/backend/organization/create-organization).
If you would like to create an organization programmatically, you can use the `createOrganization()` method. In React and Next.js applications, you can access the `createOrganization()` method via the [`useOrganizationList()`](/docs/references/react/use-organization-list) hook. In JavaScript applications, the same method is available directly on the [`Clerk` object](/docs/references/javascript/clerk/organization-methods#create-organization). The `createOrganization` method can also be accessed through the [Backend SDK](/docs/references/backend/organization/create-organization).

The only required parameter when creating a new organization is the organization name, which can be any string. You can also specify an optional slug for the new organization. If provided, the organization slug can contain only lowercase alphanumeric characters (letters and digits) and the dash "-". Organization slugs must be unique for the instance.

Expand Down
35 changes: 17 additions & 18 deletions docs/references/backend/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,50 +47,50 @@ Clerk SDKs expose an instance of the Clerk Backend SDK for use in server environ

User operations are exposed under `clerkClient.users`. The following methods are available:

### Get
### User `get` operations

- [`getUserList()`](/docs/references/backend/user/get-user-list)
- [`getUser()`](/docs/references/backend/user/get-user)
- [`getCount()`](/docs/references/backend/user/get-count)

### Create
### User `create` operations

- [`createUser()`](/docs/references/backend/user/create-user)

### Update
### User `update` operations

- [`updateUser()`](/docs/references/backend/user/update-user)
- [`updateUserMetadata()`](/docs/references/backend/user/update-user-metadata)

### Delete
### User `delete` operations

- [`deleteUser()`](/docs/references/backend/user/delete-user)

## Organization operations

Organization operations are exposed under `clerkClient.organizations`. The following methods are available:

### Get
### Organization `get` operations

- [`getOrganization()`](/docs/references/backend/organization/get-organization)
- [`getOrganizationList()`](/docs/references/backend/organization/get-organization-list)
- [`getOrganizationMembershipList()`](/docs/references/backend/organization/get-organization-membership-list)
- [`getPendingOrganizationInvitationList()`](/docs/references/backend/organization/get-pending-organization-invitation-list)

### Create
### Organization `create` operations

- [`createOrganization()`](/docs/references/backend/organization/create-organization)
- [`createOrganizationMembership()`](/docs/references/backend/organization/create-organization-membership)
- [`createOrganizationInvitation()`](/docs/references/backend/organization/create-organization-invitation)

### Update
### Organization `update` operations

- [`updateOrganization()`](/docs/references/backend/organization/update-organization)
- [`updateOrganizationMembership()`](/docs/references/backend/organization/update-organization-membership)
- [`updateOrganizationMetadata()`](/docs/references/backend/organization/update-organization-metadata)
- [`updateOrganizationMembershipMetadata()`](/docs/references/backend/organization/update-organization-membership-metadata)

### Delete
### Organization `delete` operations

- [`deleteOrganization()`](/docs/references/backend/organization/delete-organization)
- [`deleteOrganizationMembership()`](/docs/references/backend/organization/delete-organization-membership)
Expand All @@ -100,58 +100,57 @@ Organization operations are exposed under `clerkClient.organizations`. The follo

Allowlist Identifiers operations are exposed under `clerkClient.allowlistIdentifiers`. The following methods are available:

### Get
### Allowlist Identifiers `get` operations

- [`getAllowlistIdentifierList()`](/docs/references/backend/allowlist/get-allowlist-identifier-list)

### Create
### Allowlist Identifiers `create` operations

- [`createAllowlistIdentifier()`](/docs/references/backend/allowlist/create-allowlist-identifier)

### Delete
### Allowlist Identifiers `delete` operations

- [`deleteAllowlistIdentifier()`](/docs/references/backend/allowlist/delete-allowlist-identifier)

## Session operations

Session operations are exposed under `clerkClient.sessions`. The following methods are available:

### Get
### Session `get` operations

- [`getSession()`](/docs/references/backend/sessions/get-session)
- [`getSessionList()`](/docs/references/backend/sessions/get-session-list)
- [`getToken()`](/docs/references/backend/sessions/get-token)
- [`authenticateRequest()`](/docs/references/backend/sessions/authenticate-request)
- [`verifySession()`](/docs/references/backend/sessions/verify-session)

### Delete
### Session `delete` operations

- [`revokeSession()`](/docs/references/backend/sessions/revoke-session)

## Client operations

Client operations are exposed under `clerkClient.clients`. The following methods are available:

### Get
### Client `get` operations

- [`getClient()`](/docs/references/backend/client/get-client)
- [`getClientList()`](/docs/references/backend/client/get-client-list)
- [`verifyClient()`](/docs/references/backend/client/verify-client)


## Invitation operations

Invitation operations are exposed under `clerkClient.invitations`. The following methods are available:

### Get
### Invitation `get` operations

- [`getInvitationList()`](/docs/references/backend/invitations/get-invitation-list)

### Create
### Invitation `create` operations

- [`createInvitation()`](/docs/references/backend/invitations/create-invitation)

### Delete
### Invitation `delete` operations

- [`revokeInvitation()`](/docs/references/backend/invitations/revoke-invitation)

Expand Down
3 changes: 0 additions & 3 deletions docs/references/javascript/clerk/clerk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ All props below are optional.
| `isSatellite` | `boolean \| ((url: URL) => boolean) \| undefined` | Clerk Flag for satellite apps. Experimental. |
| `telemetry?` | `false \| { disabled?: boolean; debug?: boolean } \| undefined` | Controls whether or not Clerk will collect [telemetry data](/docs/telemetry). |


### `signOut()`

- In a [multi-session application](/docs/custom-flows/multi-session-applications): Signs out the active user from all sessions
Expand Down Expand Up @@ -230,7 +229,6 @@ In addition to the methods listed above, the `Clerk` class also has the followin
- [`redirectToUserProfile()`](/docs/references/javascript/clerk/redirect-methods#redirect-to-user-profile)
- [`redirectToCreateOrganization()`](/docs/references/javascript/clerk/redirect-methods#redirect-to-create-organization)
- [`redirectToOrganizationProfile()`](/docs/references/javascript/clerk/redirect-methods#redirect-to-organization-profile)
- [`redirectToHome()` (deprecated)](/docs/references/javascript/clerk/redirect-methods#redirect-to-home)

### Build URLs

Expand All @@ -250,7 +248,6 @@ In addition to the methods listed above, the `Clerk` class also has the followin

### Session

- [`setSession()` (deprecated)](/docs/references/javascript/clerk/session-methods#set-session)
- [`setActive()`](/docs/references/javascript/clerk/session-methods#set-active)

[client-ref]: /docs/references/javascript/client
Expand Down
Loading

0 comments on commit 1f8267d

Please sign in to comment.