Warden: the building block behind Devise
summary
Warden is a Rack middleware that Devise uses to manage sign‑in, sign‑out and sessions; it runs after a session middleware and provides a Warden object in env for calls like authenticate and user. The talk demonstrates custom Warden strategies (email+password, remember‑me), upgrades passwords to bcrypt, and builds a working example that returns a set‑cookie header on success and a 401 failure app with the strategy message on failure. It also covers scopes in session and authentication callbacks.
AI-written summary · about
chapters (17)
- 0:00Start
- 4:06Rack application
- 4:51Rack middleware
- 6:04Rack app example
- 7:37Session serialization
- 8:25email & password strategy
- 9:19Methods available inside strategies
- 9:55Using a strategy
- 11:36Warden setup
- 13:35Encrypting a password
- 14:48e-commerce
- 15:40Multiple models with devise
- 16:59Using scopes
- 17:40Scope configuration
- 21:28Prepend callbacks
- 22:04Review
- 23:14Benefits of knowing how a Gem works
related talks
35mStuck in the Middle: Leverage the power of Rack Middleware
24mUnraveling the black box: past, present and future of authentication in Rails
09mBeyond the Login Page: Authentication in Next.js
27mAuthorization in the GraphQL era
01h 24mSymfony security component in examples
27mGo Auth Urself
36mService Oriented Authenication
27mLayered Security
