Skip to content

Adding Authentication To React Apps /// What I learned from "React - The Complete Guide 2024 (incl. Next.js, Redux) - Academind by Maximilian Schwarzmüller"

Notifications You must be signed in to change notification settings

selmasaltik/react-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

Authentication

User Signup & Login

  • How Authentication Works In React Apps
  • Implementing User Authentication
  • Adding Authentication Persistence & Auto-Logout

Authentication is needed if content should be protected

i.e., if content should not be accessible by everyone

Getting Permission

How Does Authentication Work?

Client and server can’t just exchange a “Yes”

Any client could simply send a request to our backend that “tells” the backend that we previously were granted access

Server-side Sessions

  • Store unique identifier on server, send same identifier to client
  • Client sends identifier along with requests to protected resources
  • Server can then check if the identifier is valid (= previously issued by server to client)

Authentication Tokens

  • Create (but not store) “permission” token on server & send it to the client
  • Client attaches token to future requests for protected resources
  • Server can then verify the attached token

Working with Decoupled Backends

About

Adding Authentication To React Apps /// What I learned from "React - The Complete Guide 2024 (incl. Next.js, Redux) - Academind by Maximilian Schwarzmüller"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published