Back to Browse

Full Stack Web Development | Day 15 | Mini | JWT Authentication & Protected Routes | EDXcellence

3 views
May 14, 2026
8:02

Welcome to Day 15 of Full Stack Web Development Training at EDXcellence Academy. In this session, we implement JSON Web Token based authentication to maintain login sessions securely across routes. Mentor Venu Tejaswi Manndagiri demonstrates how to generate JWT tokens during signup, store them as cookies, verify them using middleware, and protect restricted routes like the profile page. This session marks the completion of the backend security module before transitioning to frontend development. Topics Covered in This Session: JWT Introduction Understanding sessions and cookies Why login state is not maintained without tokens Role of JWT in modern backend applications Package Installation Installing jsonwebtoken Installing cookie parser Configuring middleware Generating JWT Token Using jwt sign function Adding user ID and email in payload Using secret key Sending token as cookie Returning response after signup Login Verification Middleware Creating is login middleware Checking if cookie exists Using jwt verify function Redirecting unauthorized users Allowing authenticated users Protected Route Implementation Creating profile route Applying middleware before route access Ensuring only logged-in users can access profile Security Flow Client receives token Token stored in browser Token sent with every request Server verifies token before granting access Quiz Attempt Quiz initiated Technical issue encountered Quiz postponed Assignment Run JWT implementation locally Test login and protected route Verify cookie storage Build small feature using authentication logic Next Phase Frontend development begins HTML and CSS implementation Subscribe to EDXcellence Academy for structured Full Stack Web Development training and real-world backend security implementation.

Download

0 formats

No download links available.

Full Stack Web Development | Day 15 | Mini | JWT Authentication & Protected Routes | EDXcellence | NatokHD