@netlify/identity 0.3.1-alpha.3 → 0.3.1-alpha.4
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.
- package/README.md +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -527,13 +527,13 @@ const AUTH_EVENTS: {
|
|
|
527
527
|
|
|
528
528
|
Constants for auth event names. Use these instead of string literals for type safety and autocomplete.
|
|
529
529
|
|
|
530
|
-
| Event | When it fires
|
|
531
|
-
| --------------- |
|
|
532
|
-
| `LOGIN` | `login()`, `signup()` (with autoconfirm), `recoverPassword()`, `handleAuthCallback()` (OAuth/confirmation), `hydrateSession()`
|
|
533
|
-
| `LOGOUT` | `logout()`
|
|
534
|
-
| `TOKEN_REFRESH` | The library's auto-refresh timer refreshes an expiring access token and syncs the new token to the `nf_jwt` cookie. Fires automatically after `login()`, `hydrateSession()`,
|
|
535
|
-
| `USER_UPDATED` | `updateUser()`, `verifyEmailChange()`, `handleAuthCallback()` (email change)
|
|
536
|
-
| `RECOVERY` | `handleAuthCallback()` (recovery token only). The user is authenticated but has **not** set a new password yet. Listen for this to redirect to a password reset form. `recoverPassword()` emits `LOGIN` instead because it completes both steps (token redemption + password change).
|
|
530
|
+
| Event | When it fires |
|
|
531
|
+
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
532
|
+
| `LOGIN` | `login()`, `signup()` (with autoconfirm), `recoverPassword()`, `handleAuthCallback()` (OAuth/confirmation), `hydrateSession()` |
|
|
533
|
+
| `LOGOUT` | `logout()` |
|
|
534
|
+
| `TOKEN_REFRESH` | The library's auto-refresh timer refreshes an expiring access token and syncs the new token to the `nf_jwt` cookie. Fires automatically after any session-establishing flow: `login()`, `signup()`, `hydrateSession()`, `handleAuthCallback()`, `getUser()`, `confirmEmail()`, `recoverPassword()`, `acceptInvite()`. |
|
|
535
|
+
| `USER_UPDATED` | `updateUser()`, `verifyEmailChange()`, `handleAuthCallback()` (email change) |
|
|
536
|
+
| `RECOVERY` | `handleAuthCallback()` (recovery token only). The user is authenticated but has **not** set a new password yet. Listen for this to redirect to a password reset form. `recoverPassword()` emits `LOGIN` instead because it completes both steps (token redemption + password change). |
|
|
537
537
|
|
|
538
538
|
#### `AuthEvent`
|
|
539
539
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/identity",
|
|
3
|
-
"version": "0.3.1-alpha.
|
|
3
|
+
"version": "0.3.1-alpha.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Headless auth functions for Netlify Identity (not the widget). Import { login, getUser } and call them. No init, no class, no UI.",
|
|
6
6
|
"main": "./dist/index.cjs",
|