Module 50: Full-Stack Integration

Lesson 3 of 5 · 15–25 minutes

Sign-in, roles and permissions across the stack

🏠The everyday picture

An office where the reception desk, the lift and every door use the same staff card system. Your card works everywhere you're allowed and nowhere else, and losing it can be cancelled in one place.

📘What it really is

🖱️Try it

Connect sign-in, /me, sign-out and session expiry between the React app and the API. Show admin-only actions only to admins. Then, signed in as staff, use developer tools to send an admin-only request directly (copy a request as fetch and change it) and check the API refuses it with 403.

✅Quick check

Why clear cached data on sign-out?

Show the answer

So the next person using the same browser can't see the previous person's data.

The UI hides "Delete" from staff. Is that enough?

Show the answer

No. The API must refuse deletes from staff; hiding the button is only for clarity.

← PreviousConnecting React to your backend
ProLearners Assist