Skip to content

Latest commit

 

History

History
88 lines (61 loc) · 3.48 KB

overview.mdx

File metadata and controls

88 lines (61 loc) · 3.48 KB
title React SDK Overview
sidebar_position 1
sidebar_label Overview
description React SDK for seamless authentication integration

React SDK

The React SDK (@thunderid/react) provides a comprehensive set of components, hooks, and utilities to integrate authentication and user management into your React applications.

Installation

Install the React SDK using your preferred package manager:

npm install @thunderid/react yarn add @thunderid/react pnpm add @thunderid/react bun add @thunderid/react

Getting Started

To get started quickly, check out our React Quickstart Guide for step-by-step instructions.

:::warning Use the redirect-based sign-in flow Browser SPAs should sign in using the redirect-based OAuth2 authorization_code + PKCE flow. Use the <SignInButton /> component.

Initiating a sign-in flow directly in the browser — the embedded <SignIn /> component or useThunderID().signIn({ applicationId }) used standalone — is not supported for browser SPAs. See Register an application. :::

Features

Contexts

The SDK provides a powerful context provider that manages authentication state across your application.

  • <ThunderIDProvider /> - Root provider component that wraps your application and manages authentication state

Components

Pre-built, customizable components for common authentication flows and user management.

Action Components

Control Components

  • <SignedIn /> - Conditionally render content for authenticated users
  • <SignedOut /> - Conditionally render content for unauthenticated users
  • <Loading /> - Display loading state during authentication

User Self-care Components

Hooks

React hooks for programmatic access to authentication and user data.

Customization

All components in the React SDK are fully customizable. You can:

  • Override default styles using CSS classes or inline styles
  • Customize component behavior through props
  • Build custom components using the provided hooks
  • Extend functionality with middleware and plugins