SlideShare a Scribd company logo
1 of 7
AUTHENTICATION
AND
AUTHORIZATION
IN MERN STACK
APPLICATIONS
Add a little bit of body
text
Authentication and Authorization
are critical components of every
online application, especially those
created using the MERN stack
(MongoDB, Express.js, React,
Node.js). They aid in ensuring that
only authorized users have access
to specified resources or may
execute specific activities within the
program. To know more, check the
MERN Stack Training in Noida.
Authentication
and Authorization
in MERN Stack
Applications
Implementation of
Authentication and
Authorization in MERN
Stack Applications
The overview of the implementation of
Authentication and Authorization in
MERN Stack Applications has been
listed below for reference:
Authentication
Authentication can be referred to as the
process of verification of the identity of a
user. In a MERN Stack Application,
different authentication mechanisms like
username/password-based authentication
or social media authentication can be
put to use. The most common approach
is to use JSON web tokens (JWT) for
authentication.
• As soon as the user logs in with his valid login credentials, the
concerned server is known to generate a JWT which contains a
unique identifier for the user and signs it with a secret code.
• Following this, the server sends the JWT code back to the user
which securely stores it in a local storage or cookie.
• The client adds the JWT to the request headers for subsequent
requests to secured routes.
• Next, the server is given the task of verifying the authenticity as
well as the validity of the JWT by evaluating the expiration date
and signatures.
• If the JWT is proven to be valid, the user is held to be
authenticated by the server and is then allowed access to the
source asked for.
Authorization
Authorization is a process of defining
what the user can and cannot do
within a given application once
authenticated. It includes the
definition of roles, permissions, and
access levels for different resources
or routes.
THANK YOU!

More Related Content

Similar to Authentication and Authorization in MERN Stack Applications.pptx

Efficient and Secure Single Sign on Mechanism for Distributed Network
Efficient and Secure Single Sign on Mechanism for Distributed NetworkEfficient and Secure Single Sign on Mechanism for Distributed Network
Efficient and Secure Single Sign on Mechanism for Distributed Network
IJERA Editor
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
WebStackAcademy
 
Learn with WSO2 - API Security
Learn with WSO2 - API Security Learn with WSO2 - API Security
Learn with WSO2 - API Security
WSO2
 

Similar to Authentication and Authorization in MERN Stack Applications.pptx (20)

apidays Helsinki & North 2023 - API authorization with Open Policy Agent, And...
apidays Helsinki & North 2023 - API authorization with Open Policy Agent, And...apidays Helsinki & North 2023 - API authorization with Open Policy Agent, And...
apidays Helsinki & North 2023 - API authorization with Open Policy Agent, And...
 
Distributed Authorization with Open Policy Agent.pdf
Distributed Authorization with Open Policy Agent.pdfDistributed Authorization with Open Policy Agent.pdf
Distributed Authorization with Open Policy Agent.pdf
 
Microsoft Graph API Delegated Permissions
Microsoft Graph API Delegated PermissionsMicrosoft Graph API Delegated Permissions
Microsoft Graph API Delegated Permissions
 
OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)
 
Efficient and Secure Single Sign on Mechanism for Distributed Network
Efficient and Secure Single Sign on Mechanism for Distributed NetworkEfficient and Secure Single Sign on Mechanism for Distributed Network
Efficient and Secure Single Sign on Mechanism for Distributed Network
 
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
 
SCWCD : Secure web
SCWCD : Secure webSCWCD : Secure web
SCWCD : Secure web
 
SCWCD : Secure web : CHAP : 7
SCWCD : Secure web : CHAP : 7SCWCD : Secure web : CHAP : 7
SCWCD : Secure web : CHAP : 7
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 
Complete Guide to Setup Secure Scheme for Restful APIs
Complete Guide to Setup Secure Scheme for Restful APIsComplete Guide to Setup Secure Scheme for Restful APIs
Complete Guide to Setup Secure Scheme for Restful APIs
 
TMCnet final
TMCnet finalTMCnet final
TMCnet final
 
Understanding Security for Oracle WebLogic Server
Understanding Security for Oracle WebLogic ServerUnderstanding Security for Oracle WebLogic Server
Understanding Security for Oracle WebLogic Server
 
A Survey on SSO Authentication protocols: Security and Performance
A Survey on SSO Authentication protocols: Security and PerformanceA Survey on SSO Authentication protocols: Security and Performance
A Survey on SSO Authentication protocols: Security and Performance
 
Two-factor Authentication
Two-factor AuthenticationTwo-factor Authentication
Two-factor Authentication
 
Learn with WSO2 - API Security
Learn with WSO2 - API Security Learn with WSO2 - API Security
Learn with WSO2 - API Security
 
Spring Security
Spring SecuritySpring Security
Spring Security
 
.NET Core, ASP.NET Core Course, Session 19
 .NET Core, ASP.NET Core Course, Session 19 .NET Core, ASP.NET Core Course, Session 19
.NET Core, ASP.NET Core Course, Session 19
 
Introducing OpenID 1.0 Protocol: Security and Performance
Introducing OpenID 1.0 Protocol: Security and PerformanceIntroducing OpenID 1.0 Protocol: Security and Performance
Introducing OpenID 1.0 Protocol: Security and Performance
 
JDD2015: Security in the era of modern applications and services - Bolesław D...
JDD2015: Security in the era of modern applications and services - Bolesław D...JDD2015: Security in the era of modern applications and services - Bolesław D...
JDD2015: Security in the era of modern applications and services - Bolesław D...
 
e-SUAP - Security - Windows azure access control list (english version)
e-SUAP - Security - Windows azure access control list (english version)e-SUAP - Security - Windows azure access control list (english version)
e-SUAP - Security - Windows azure access control list (english version)
 

More from Microsoft azure

More from Microsoft azure (20)

Deep Learning in Robotics Enhancing Perception and Decision-Making (1).pptx
Deep Learning in Robotics Enhancing Perception and Decision-Making (1).pptxDeep Learning in Robotics Enhancing Perception and Decision-Making (1).pptx
Deep Learning in Robotics Enhancing Perception and Decision-Making (1).pptx
 
Navigating the Sky Careers with Cloud Computing Training.pptx
Navigating the Sky Careers with Cloud Computing Training.pptxNavigating the Sky Careers with Cloud Computing Training.pptx
Navigating the Sky Careers with Cloud Computing Training.pptx
 
Deep Learning in Robotics Enhancing Perception and Decision-Making (1).pptx
Deep Learning in Robotics Enhancing Perception and Decision-Making (1).pptxDeep Learning in Robotics Enhancing Perception and Decision-Making (1).pptx
Deep Learning in Robotics Enhancing Perception and Decision-Making (1).pptx
 
Oracle Business Intelligence.pptx
Oracle Business Intelligence.pptxOracle Business Intelligence.pptx
Oracle Business Intelligence.pptx
 
The Future of Cloud Computing Latest Trends and Innovations.pptx
The Future of Cloud Computing Latest Trends and Innovations.pptxThe Future of Cloud Computing Latest Trends and Innovations.pptx
The Future of Cloud Computing Latest Trends and Innovations.pptx
 
The Role of Machine Learning in Advancing Artificial Intelligence.pptx
The Role of Machine Learning in Advancing Artificial Intelligence.pptxThe Role of Machine Learning in Advancing Artificial Intelligence.pptx
The Role of Machine Learning in Advancing Artificial Intelligence.pptx
 
Creating a Successful Cloud-Based Modern Data Analytics Platform.pptx
Creating a Successful Cloud-Based Modern Data Analytics Platform.pptxCreating a Successful Cloud-Based Modern Data Analytics Platform.pptx
Creating a Successful Cloud-Based Modern Data Analytics Platform.pptx
 
Deep Learning in Robotics Enhancing Perception and Decision-Making (1).pptx
Deep Learning in Robotics Enhancing Perception and Decision-Making (1).pptxDeep Learning in Robotics Enhancing Perception and Decision-Making (1).pptx
Deep Learning in Robotics Enhancing Perception and Decision-Making (1).pptx
 
DevOps Best Practices (1).pdf
DevOps Best Practices (1).pdfDevOps Best Practices (1).pdf
DevOps Best Practices (1).pdf
 
Article - Google Docs.pdf
Article - Google Docs.pdfArticle - Google Docs.pdf
Article - Google Docs.pdf
 
DevOps Best Practices Ensuring Quality and Security (1).pptx
DevOps Best Practices Ensuring Quality and Security (1).pptxDevOps Best Practices Ensuring Quality and Security (1).pptx
DevOps Best Practices Ensuring Quality and Security (1).pptx
 
DevOps Best Practices Tips for Successful Implementation.pptx
DevOps Best Practices Tips for Successful Implementation.pptxDevOps Best Practices Tips for Successful Implementation.pptx
DevOps Best Practices Tips for Successful Implementation.pptx
 
Efficient Deep Learning Exploring the Power of Model Compression.pptx
Efficient Deep Learning Exploring the Power of Model Compression.pptxEfficient Deep Learning Exploring the Power of Model Compression.pptx
Efficient Deep Learning Exploring the Power of Model Compression.pptx
 
Your Complete Digital Marketing Course Guide for 2023
Your Complete Digital Marketing Course Guide for 2023Your Complete Digital Marketing Course Guide for 2023
Your Complete Digital Marketing Course Guide for 2023
 
Navigating the Sky Careers with Cloud Computing Training.pptx
Navigating the Sky Careers with Cloud Computing Training.pptxNavigating the Sky Careers with Cloud Computing Training.pptx
Navigating the Sky Careers with Cloud Computing Training.pptx
 
The Role of Machine Learning in Advancing Artificial Intelligence.pptx
The Role of Machine Learning in Advancing Artificial Intelligence.pptxThe Role of Machine Learning in Advancing Artificial Intelligence.pptx
The Role of Machine Learning in Advancing Artificial Intelligence.pptx
 
Optimizing Performance in MEAN Stack Apps.pptx
Optimizing Performance in MEAN Stack Apps.pptxOptimizing Performance in MEAN Stack Apps.pptx
Optimizing Performance in MEAN Stack Apps.pptx
 
Optimizing Performance in MEAN Stack Apps.pptx
Optimizing Performance in MEAN Stack Apps.pptxOptimizing Performance in MEAN Stack Apps.pptx
Optimizing Performance in MEAN Stack Apps.pptx
 
Step-By-Step Instructions for Learning Tableau in 2023.pptx
Step-By-Step Instructions for Learning Tableau in 2023.pptxStep-By-Step Instructions for Learning Tableau in 2023.pptx
Step-By-Step Instructions for Learning Tableau in 2023.pptx
 
Creating a Successful Cloud-Based Modern Data Analytics Platform.pptx
Creating a Successful Cloud-Based Modern Data Analytics Platform.pptxCreating a Successful Cloud-Based Modern Data Analytics Platform.pptx
Creating a Successful Cloud-Based Modern Data Analytics Platform.pptx
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 

Recently uploaded (20)

Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 

Authentication and Authorization in MERN Stack Applications.pptx

  • 2. Authentication and Authorization are critical components of every online application, especially those created using the MERN stack (MongoDB, Express.js, React, Node.js). They aid in ensuring that only authorized users have access to specified resources or may execute specific activities within the program. To know more, check the MERN Stack Training in Noida. Authentication and Authorization in MERN Stack Applications
  • 3. Implementation of Authentication and Authorization in MERN Stack Applications The overview of the implementation of Authentication and Authorization in MERN Stack Applications has been listed below for reference:
  • 4. Authentication Authentication can be referred to as the process of verification of the identity of a user. In a MERN Stack Application, different authentication mechanisms like username/password-based authentication or social media authentication can be put to use. The most common approach is to use JSON web tokens (JWT) for authentication.
  • 5. • As soon as the user logs in with his valid login credentials, the concerned server is known to generate a JWT which contains a unique identifier for the user and signs it with a secret code. • Following this, the server sends the JWT code back to the user which securely stores it in a local storage or cookie. • The client adds the JWT to the request headers for subsequent requests to secured routes. • Next, the server is given the task of verifying the authenticity as well as the validity of the JWT by evaluating the expiration date and signatures. • If the JWT is proven to be valid, the user is held to be authenticated by the server and is then allowed access to the source asked for.
  • 6. Authorization Authorization is a process of defining what the user can and cannot do within a given application once authenticated. It includes the definition of roles, permissions, and access levels for different resources or routes.