メインコンテンツへスキップ
Import Example
import React, { useState } from "react";
import {
  useMfaVoiceChallenge,
  useUser,
  useTenant,
  useBranding,
  useClient,
  useOrganization,
  usePrompt,
  useUntrustedData,
} from "@auth0/auth0-acul-react/mfa-voice-challenge";

コンテキスト用 Hooks

useBranding
ブランディングおよびテーマ構成にアクセスするための Hook です。
Example
import { useBranding } from '@auth0/auth0-acul-react/login-id';
function CustomTheme() {
  const branding = useBranding();
}
useClient
Auth0 アプリケーション(クライアント)の構成にアクセスするための Hook です。
Example
import { useClient } from '@auth0/auth0-acul-react/login-id';
function AppInfo() {
  const client = useClient();
}
useOrganization
組織コンテキストと設定にアクセスするための Hook です。
Example
import { useOrganization } from '@auth0/auth0-acul-react/login-id';
function OrgSelector() {
  const organization = useOrganization();
  if (!organization) {
    return <p>組織コンテキストがありません</p>;
  }
}
usePrompt
プロンプト設定およびフロー設定にアクセスするための Hook です。
Example
import { usePrompt } from '@auth0/auth0-acul-react/login-id';
function FlowInfo() {
  const prompt = usePrompt();
}
useScreen
現在の画面情報およびメタデータにアクセスするための Hook です。現在の画面名、設定、および画面固有のデータを含む画面オブジェクトです。
Example
import { useScreen } from '@auth0/auth0-acul-react/login-id';
function ScreenDebug() {
  const screen = useScreen();
}
useTenant
テナントの構成および設定にアクセスするための Hook です。
Example
import { useTenant } from '@auth0/auth0-acul-react/login-id';
function TenantInfo() {
  const tenant = useTenant();
}
useTransaction
トランザクションの状態および認証フローのデータにアクセスするための Hook です。
Example
import { useTransaction } from '@auth0/auth0-acul-react/login-id';
function TransactionInfo() {
  const transaction = useTransaction();
}
useUntrustedData
URL パラメーターおよびフォーム送信からの信頼できないデータにアクセスするための Hook です。使用前に検証する必要がある、信頼できないユーザー入力を含むオブジェクトです。
Example
import { useUntrustedData } from '@auth0/auth0-acul-react/login-id';
function PrefilledForm() {
  const untrustedData = useUntrustedData();
}
useUser
ユーザー情報およびプロファイルデータにアクセスするための Hook です。
Example
import { useUser } from '@auth0/auth0-acul-react/login-id';
function UserProfile() {
  const user = useUser();
}

メソッド

continueMethod
pickPhone
resendCode
switchToSms
tryAnotherMethod
useMfaVoiceChallenge

共通/ユーティリティ フック