ChurchServe React Tutorial Part 13-2: Session State and Antiforgery
Connect React to an ASP.NET Core cookie session with explicit restoration states, validated user profiles, XSRF-aware fetch calls, and accessible sign-in and sign-out UI.
Connect React to an ASP.NET Core cookie session with explicit restoration states, validated user profiles, XSRF-aware fetch calls, and accessible sign-in and sign-out UI.
Protect a React application’s ASP.NET Core API with encrypted cookie sessions, a development-only local account, antiforgery tokens, and authenticated integration tests.
Test a React application’s ASP.NET Core API through real HTTP requests, EF Core migrations, isolated SQLite databases, validation failures, and restart persistence.
Replace process-memory API storage with durable SQLite persistence using EF Core entities, migrations, asynchronous queries, idempotent seed data, and restart verification.
Connect React to an ASP.NET Core API through a fetch-based repository with cancellation, runtime response validation, REST status handling, and development proxying.
Model honest asynchronous data boundaries in React with abort-aware repository operations, explicit route request states, retries, and safe form submission feedback.
Persist React service events across browser sessions with a versioned localStorage repository, runtime validation, immutable snapshots, and graceful failure handling.
Decouple React route pages from in-memory storage with a repository contract, composition-root selection, useSyncExternalStore, and focused implementation tests.
Add bookmarkable service-event URLs, a dedicated creation route, semantic card links, shared context state, explicit missing-record handling, and route tests.
Create service events with typed controlled inputs, pure field and time-range validation, accessible errors, normalized commands, and immutable schedule updates.