Skip to content

Passport.js

Introduction to Local Strategy

What Is Passport.js

Passport Logo Passport.js is a middleware for authentication tailored to node.js, designed to offer various authentication strategies for your application. With its features, you can enable users to log in using social media accounts such as Facebook or Google, or through username and password. This middleware provides a convenient solution for developers who aim to implement authentication in their Express-based applications.

Benefits For Full Stack Students

For Term 2 Full Stack Web Development students, Passport.js is a valuable library that offers flexibility in terms of authentication as students learn to develop applications. By utilizing Passport.js, students can streamline the login process, allowing them to focus on learning additional skills in various programming languages, technologies, and so on.

Understanding Our Documentation

We have included numerous admonitions to make understanding passport.js easier for you. Some of them will have an arrow on the right hand side to collapse or open the information.

Notes

Notes will provide relevant information to that specific instruction.

Code Blocks

Code samples will be placed in these code blocks. There is a copy & paste icon in the top right corner of the black code block.

Success

Screenshots will be placed here, providing you with an example of what each step should look like.

Tips & Resources

Tips and links to relevant resources will be provided here, allowing you to learn more about passport.js and related libraries.

Read Before Proceeding

Warnings will be placed here to make sure that you understand the prerequisites before proceeding with complicated instructions.

Errors

Potential errors will be shown here.

Project Requirements

Languages & Technologies

To learn Passport.js, users should have fundamental knowledge of certain languages and technologies, including:

    ✔ HTML

  • Creating forms
  • Creating buttons

    ✔ Javascript

  • Event listeners
  • Adding functionality to forms

    ✔ Express

  • Setting up an express application

    ✔ Visual Studio Code (VSCode)

  • Creating files
  • Running code on your local browser
Bonus Knowledge

Knowledge of additional languages and technologies would be beneficial. Some examples are:

  • Express Sessions
  • Cascading Style Sheets (CSS)
Inexperienced Users

Users who lack confidence in these languages and technologies should review their respective documentation before learning Passport.js.

Review Documentation

    HTML Documentation

    HTML Forms

    Javascript

    Javascript Event Listeners

    Express

Next Page: Preliminary Setup