@netlify/identity 0.1.1-alpha.24 → 0.1.1-alpha.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +27 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,13 +4,38 @@ A lightweight, no-config headless authentication library for projects using Netl
4
4
 
5
5
  > **Status:** Beta. The API may change before 1.0.
6
6
 
7
- For a pre-built login widget, see [netlify-identity-widget](https://github.com/netlify/netlify-identity-widget).
8
-
9
7
  **Prerequisites:**
10
8
 
11
9
  - [Netlify Identity](https://docs.netlify.com/security/secure-access-to-sites/identity/) must be enabled on your Netlify project
12
10
  - For local development, use [`netlify dev`](https://docs.netlify.com/cli/local-development/) so the Identity endpoint is available
13
11
 
12
+ ### How this library relates to other Netlify auth packages
13
+
14
+ | Package | What it is | When to use it |
15
+ | ------------------------------------------------------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------ |
16
+ | **`@netlify/identity`** (this library) | Headless TypeScript API for browser and server | You want full control over your auth UI and need server-side auth (SSR, Netlify Functions) |
17
+ | [`netlify-identity-widget`](https://github.com/netlify/netlify-identity-widget) | Pre-built login/signup modal (HTML + CSS) | You want a drop-in UI component with no custom design |
18
+ | [`gotrue-js`](https://github.com/netlify/gotrue-js) | Low-level GoTrue HTTP client (browser only) | You're building your own auth wrapper and need direct API access |
19
+
20
+ This library wraps `gotrue-js` in the browser and calls the GoTrue HTTP API directly on the server. It provides a unified API that works in both contexts, handles cookie management, and normalizes the user object. You do not need to install `gotrue-js` or the widget separately.
21
+
22
+ ## Table of contents
23
+
24
+ - [Installation](#installation)
25
+ - [Quick start](#quick-start)
26
+ - [API](#api)
27
+ - [Functions](#functions) -- `getUser`, `login`, `signup`, `logout`, `oauthLogin`, `handleAuthCallback`, `onAuthChange`, `hydrateSession`, and more
28
+ - [Types](#types) -- `User`, `AuthEvent`, `CallbackResult`, `Settings`, etc.
29
+ - [Errors](#errors) -- `AuthError`, `MissingIdentityError`
30
+ - [Framework integration](#framework-integration) -- Next.js, Remix, TanStack Start, Astro, SvelteKit
31
+ - [Guides](#guides)
32
+ - [React `useAuth` hook](#react-useauth-hook)
33
+ - [Listening for auth changes](#listening-for-auth-changes)
34
+ - [OAuth login](#oauth-login)
35
+ - [Password recovery](#password-recovery)
36
+ - [Invite acceptance](#invite-acceptance)
37
+ - [Session lifetime](#session-lifetime)
38
+
14
39
  ## Installation
15
40
 
16
41
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/identity",
3
- "version": "0.1.1-alpha.24",
3
+ "version": "0.1.1-alpha.25",
4
4
  "type": "module",
5
5
  "description": "Add authentication to your Netlify site with a few lines of code",
6
6
  "main": "./dist/index.cjs",