Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
rodauth device and you
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Anton Davydov
October 22, 2016
Programming
260
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
rodauth device and you
Anton Davydov
October 22, 2016
More Decks by Anton Davydov
See All by Anton Davydov
How to make a technical decision
davydovanton
0
150
МГТУ
davydovanton
0
120
Events. Events. Events! - krk.rb
davydovanton
0
160
Events. Events. Events!
davydovanton
0
850
Event Sourcing RubySPBConf 2k18
davydovanton
1
220
Architecture of hanami applications
davydovanton
1
7.8k
Hanami Architecture
davydovanton
2
330
viewing ruby blossom kaigi2017
davydovanton
0
760
viewing ruby blossom rdrc2017
davydovanton
2
240
Other Decks in Programming
See All in Programming
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
yield再入門 #phpcon
o0h
PRO
0
560
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.1k
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
110
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
180
symfony/aiとlaravel/boost
77web
0
130
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
330
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
440
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
2.8k
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.5k
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
140
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
190
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
190
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.4k
Utilizing Notion as your number one productivity tool
mfonobong
4
430
How to Ace a Technical Interview
jacobian
281
24k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Mobile First: as difficult as doing things right
swwweet
225
10k
So, you think you're a good person
axbom
PRO
2
2.1k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
250
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.8k
How to make the Groovebox
asonas
2
2.3k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
550
Transcript
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