Learn Buffalo

Middleware and User Authentication Plugin

Part 7

Leverage a Buffalo plugin to generate user authentication.

  • user authentication patterns
  • Plugins in Buffalo to generate boilerplate code
  • buffalo-auth plugin
  • add email, password_hash fields to User, to use with authentication
  • using Middleware to check for login status, and fetch data for use in “next” handler
  • add forms for User register and User login
  • add dynamic page for user landing to show login/logout, depending on auth status

Watch the video

View the code