user authentication
play

User Authentication Passport Jason Situ Passport What is it? - PowerPoint PPT Presentation

User Authentication Passport Jason Situ Passport What is it? Passport is authentication middleware for Node. It is designed to serve a singular purpose: authenticate requests. Supports a comprehensive set of authentication mechanisms called


  1. User Authentication Passport Jason Situ

  2. Passport

  3. What is it? Passport is authentication middleware for Node. It is designed to serve a singular purpose: authenticate requests. Supports a comprehensive set of authentication mechanisms called strategies Strategies are packaged as individual modules that makes it easy to plug different forms of authentication into a web application http://www.passportjs.org/docs/

  4. Configuring Passport app.use - add middleware required to initialize passport and support user sessions

  5. 
 Using Strategies Strategies supplied via use() Strategies require what’s known as a verify callback which is code that finds a user with given credentials

  6. Using Strategies The verify callback is invoked with the given credentials as arguments. If they’re valid, done is invoked with the user that was authenticated and passes that user to Passport

  7. Using Sessions If authentication succeeds, a session will be established and maintained as cookie in the user’s browser Subsequent requests will contain the unique cookie that identifies the user Passport will serialize the user instance into the session for you

  8. How do we handle username, password, and security?

  9. MP3 Never store passwords in plain text! Use bcrypt https://plaintextoffenders.com/

  10. DEMO

  11. Problem with Passport and ReactJS React has its own router management

  12. Problem with Passport and ReactJS Built callback will not work, use Custom Callback instead

  13. Don’t like MongoDB? No problem!

  14. FIREBASE Realtime Database Authentication Serverless Hosting

  15. QUESTIONS?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend