BETTER-AUTH. UI
Mutations

useCheckSlug

Check whether an organization slug is available.

Usage

import { useCheckSlug } from "@better-auth-ui/solid/plugins/organization"

const mutation = useCheckSlug(authClient)

mutation.mutate(/* params */)

Organization mutations require organizationClient() on the Better Auth client. They attach the same meta.invalidates / meta.awaits cache metadata used by the shared React implementation, and the Solid AuthProvider installs a mutation invalidator that refreshes affected organization/session caches after successful auth mutations.

Options factory

import { checkSlugOptions } from "@better-auth-ui/core/plugins/organization"
import { useMutation } from "@tanstack/solid-query"

const mutation = useMutation(() => checkSlugOptions(authClient))

Params

Prop

Type

Last updated on

On this page