Sign in

Overview

MonoCloud’s React SDK lets you add authentication to your React single-page application.

Use it to:

  • Authenticate users
  • Keep users signed in across page reloads and tabs
  • Access the signed-in user anywhere in your component tree
  • Conditionally render or gate UI based on authentication and group membership
  • Call your protected APIs with access tokens

The SDK builds on top of @monocloud/auth-web-js, reusing the same browser implementation (PKCE, redirects, popups, silent refresh, and cross-tab coordination) while providing a React provider, hooks, and components.

Install the SDK

Install the SDK using your package manager:

Terminal
npm install @monocloud/auth-react

View the source on GitHub: monocloud/auth-js

Get started quickly

Start with the quickstart to see MonoCloud in action:

The quickstart walks you from a new Vite + React app to a signed-in user in a few minutes.

Before you continue

To integrate MonoCloud into your own app:

  1. Follow the installation and configuration guide.
  2. Use the guides below to build out your app's authentication flow.

Guides

API Reference

View all exported provider, hooks, components, and types:

© 2024 MonoCloud. All rights reserved.