BETTER-AUTH. UI
Mutations

oauthConsentOptions

Accept or deny the current OAuth authorization request.

Requires oauthProviderClient() from @better-auth/oauth-provider/client. Better Auth reads and validates the signed authorization query from the current browser URL before completing the redirect.

Options factory

import { oauthConsentOptions } from "@better-auth-ui/solid"
import { createMutation } from "@tanstack/solid-query"

const consent = createMutation(() => oauthConsentOptions(authClient))

consent.mutate({ accept: true })
consent.mutate({ accept: false })

Pass only the user's decision to accept the full requested scope set. The OAuth Provider plugin handles the redirect, so the application should not navigate to redirect_uri itself.

Params

Last updated on

On this page