Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
rodauth device and you
Search
Anton Davydov
October 22, 2016
Programming
270
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
rodauth device and you
Anton Davydov
October 22, 2016
Transcript
70 slides
None
Anton Davydov github.com/davydovanton twitter.com/anton_davydov davydovanton.com
OpenSource
None
None
None
None
authentication
typical authentication
• user authentication • working with current user • security
• different auth ways (OTP, OmniAuth, 2FA) • simple way to use it with other frameworks
but in a real life we have some
• wasting time for typical functionality • complicated logic •
magic in models/controllers • it’s hard to add new feature
and actually we can use…
devise
devise ❤ • popular • based on Rails engines •
use only what you really need • add-ons • fast for production
devise • only rails • problem with custom logic •
creates unnecessary raws in table • hulk • can be difficult to integrate
warden
sorcery
custom solution
custom solution ❤ • absolutely custom • works only for
special cases • works good when other solutions sucks
• DRY in each application • spend much time for
simple cases • you can write • you need to write all popular solutions custom solution
what problems we have • no simplicity • no flexibility
• magic • only for rails
rodauth github.com/jeremyevans/rodauth
rodauth ❤ • fast • simple • easy to integrate
with other frameworks • many features from the box • use only what you need
rodauth • little-known solution • new technology (from Jun 7,
2015) • another routing framework
Jeremy Evans github.com/jeremyevans
roda github.com/jeremyevans/roda
roda: general ideas • simplicity • reliability • extensibility •
performance
# config.ru require "roda" class App < Roda route do
|r| r.root do r.redirect "/hello" end # GET /hello request r.get "hello" do "Hello world!" end end end run App.freeze.app
# config.ru require "roda" class App < Roda route do
|r| r.root do r.redirect "/hello" end # GET /hello request r.get "hello" do "Hello world!" end end end run App.freeze.app
# config.ru require "roda" class App < Roda route do
|r| r.root do r.redirect "/hello" end # GET /hello request r.get "hello" do "Hello world!" end end end run App.freeze.app
# config.ru require "roda" class App < Roda route do
|r| r.root do r.redirect "/hello" end # GET /hello request r.get "hello" do "Hello world!" end end end run App.freeze.app
rodauth: general ideas
security
simplicity
flexibility
all features
login logout change password change login reset password create account
close account verify account confirm account remember lockout OTP recovery codes SMS codes verify change login verify account grace period password grace period password complexity disallow password reuse password expiration account expiration session expiration single session JWT (JSON API)
architecture
it’s just a plugin for roda
# cat config.ru require "roda" class RodauthApp < Roda plugin
:rodauth do enable :login, :logout, :change_password end route do |r| r.rodauth rodauth.require_authentication end end run RodauthApp
# cat config.ru require "roda" class RodauthApp < Roda plugin
:rodauth do enable :login, :logout, :change_password end route do |r| r.rodauth rodauth.require_authentication end end run RodauthApp
# cat config.ru require "roda" class RodauthApp < Roda plugin
:rodauth do enable :login, :logout, :change_password end route do |r| r.rodauth rodauth.require_authentication end end run RodauthApp
# cat config.ru require "roda" class RodauthApp < Roda plugin
:rodauth do enable :login, :logout, :change_password end route do |r| r.rodauth rodauth.require_authentication end end run RodauthApp
# cat config.ru require "roda" class RodauthApp < Roda plugin
:rodauth do enable :login, :logout, :change_password end route do |r| r.rodauth rodauth.require_authentication end end run RodauthApp
how we can use rodauth with other apps
general idea for integration
use middleware
Rack Rodauth Your app
Rack Rodauth Your app
Rack Rodauth Your app
Rack environment session Rodauth Your app
github.com/jeremyevans/rodauth-demo-rails
https://git.io/vPDao
github.com/davydovanton/rodauth_hanami
github.com/davydovanton/grape-rodauth JSON auth only
but we live in real world and we won’t use
this
how we can use these ideas in our apps
devise
None
None
use separate Account model instead of User/Admin
put all logic to separate application like admin app
don’t put all your logic to Model
bonus
None
• roda.jeremyevans.net • rodauth.jeremyevans.net • groups.google.com/forum/#!forum/ruby-roda • irc://chat.freenode.net/#roda • trailblazer
and devise: goo.gl/cdANIA
conclusions
None
github.com/davydovanton twitter.com/anton_davydov davydovanton.com Thank you
More Decks by Anton Davydov
See All by Anton Davydov
How to make a technical decision
davydovanton
0
160
МГТУ
davydovanton
0
130
Events. Events. Events! - krk.rb
davydovanton
0
170
Events. Events. Events!
davydovanton
0
880
Event Sourcing RubySPBConf 2k18
davydovanton
1
230
Architecture of hanami applications
davydovanton
1
7.8k
Hanami Architecture
davydovanton
2
350
viewing ruby blossom kaigi2017
davydovanton
0
790
viewing ruby blossom rdrc2017
davydovanton
2
260
Other Decks in Programming
See All in Programming
LLM 101
dalinaum
0
520
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
220
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
Getting Started with Vibe Coding
miccheng
0
240
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.2k
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
950
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
150
Claude Codeのおかげでやりたいことがやれるようになったんだよォー!
sms_tech
0
160
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
310
GraphQL の onError と Nullability のこれから
quramy
0
220
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
190
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
160
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
600
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Balancing Empowerment & Direction
lara
6
1.4k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
New Earth Scene 8
popppiees
5
2.9k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
680
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
960
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
390
What's in a price? How to price your products and services
michaelherold
247
13k
Statistics for Hackers
jakevdp
799
230k