Slide 1

Slide 1 text

DEVISE Essential Rails Gems by @jwo for @houstonrb Wednesday, February 13, 13

Slide 2

Slide 2 text

Timeline of Rails Past acts_as_authenticated - 2007 restful_authentication - 2008 authlogic - 2008/2009 devise - 2009 Wednesday, February 13, 13

Slide 3

Slide 3 text

The Essential Rails authentication system gem install devise rails g devise:install rails g devise user before_filter :authenticate_user! Wednesday, February 13, 13

Slide 4

Slide 4 text

Easiest Path Forward Just add name / address to User Don't have multiple profiles Copy views to match your style Wednesday, February 13, 13

Slide 5

Slide 5 text

Third Party Logins omni_auth Twitter Facebook Github Google Wednesday, February 13, 13

Slide 6

Slide 6 text

Other Cool Stuff token authentication APIs Views that are built in Reset Passwords built in Emails built in confirming emails email and/or login as authentication variable Wednesday, February 13, 13

Slide 7

Slide 7 text

More on Token Auth Authentication via basic HTTP auth Via url parameter /resource/34?token=boblawblaw Custom auth: http://git.io/VwdG4Q Wednesday, February 13, 13

Slide 8

Slide 8 text

Testing RSpec.configure do |config| config.include Devise::TestHelpers, type: :controller end Wednesday, February 13, 13

Slide 9

Slide 9 text

Other Stuff You Does Admin class in addition to User class API logins Create users outside of Devise Wednesday, February 13, 13

Slide 10

Slide 10 text

Alternatives has_secure_password (roll your own) sorcery (ironically no magic) Wednesday, February 13, 13

Slide 11

Slide 11 text

Criticisms too much black box difficult to customize controllers Wednesday, February 13, 13