Upgrade to Pro — share decks privately, control downloads, hide ads and more …

rodauth device and you

rodauth device and you

Anton Davydov

October 22, 2016
Tweet

More Decks by Anton Davydov

Other Decks in Programming

Transcript

  1. • user authentication • working with current user • security

    • different auth ways (OTP, OmniAuth, 2FA) • simple way to use it with other frameworks
  2. • wasting time for typical functionality • complicated logic •

    magic in models/controllers • it’s hard to add new feature
  3. devise ❤ • popular • based on Rails engines •

    use only what you really need • add-ons • fast for production
  4. devise • only rails • problem with custom logic •

    creates unnecessary raws in table • hulk • can be difficult to integrate
  5. custom solution ❤ • absolutely custom • works only for

    special cases • works good when other solutions sucks
  6. • DRY in each application • spend much time for

    simple cases • you can write • you need to write all popular solutions custom solution
  7. rodauth ❤ • fast • simple • easy to integrate

    with other frameworks • many features from the box • use only what you need
  8. # 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
  9. # 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
  10. # 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
  11. # 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
  12. 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)
  13. # 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
  14. # 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
  15. # 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
  16. # 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
  17. # 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