SlideShare a Scribd company logo
1 of 71
Download to read offline
OmniAuth:
                      From the Ground Up

                          Michael Bleigh / RailsConf 2011




Wednesday, May 18, 2011
Michael Bleigh


Wednesday, May 18, 2011
@mbleigh

Wednesday, May 18, 2011
@intridea

Wednesday, May 18, 2011
OmniAuth
                github.com/intridea/omniauth




Wednesday, May 18, 2011
Wednesday, May 18, 2011
OmniAuth!
                github.com/intridea/omniauth




Wednesday, May 18, 2011
Login with
                           anything

Wednesday, May 18, 2011
Assume
                               nothing*
                          *plus or minus a few small assumptions



Wednesday, May 18, 2011
Past.
                          Present.
                          Future.
Wednesday, May 18, 2011
Past!
                          The why of OmniAuth


Wednesday, May 18, 2011
Why are there
               so many #&@$!
                authentication
                  libraries?
Wednesday, May 18, 2011
devise
                       authlogic
                       clearance
                        sorcery
                restful-authentication,
                      and so on...
Wednesday, May 18, 2011
Assumptions.

Wednesday, May 18, 2011
I only need one User model.
        Users will sign up and provide a password.
        Only e-mail can validate users.
        I only need one authentication method.
        Iā€™m only going to use Rails in my app.
        I donā€™t have variable deploy targets.
        I donā€™t want to customize much.

Wednesday, May 18, 2011
Wednesday, May 18, 2011
Wednesday, May 18, 2011
Can we do
                           better?
Wednesday, May 18, 2011
We need a single,
              normalized system
                          for authentication.


Wednesday, May 18, 2011
I Need Auth

                          MAGIC!




                             User Info
Wednesday, May 18, 2011
OmniAuth
Wednesday, May 18, 2011
It takes a while to
            make easy things.
                          March 30, 2010        First Commit


                          October 1, 2010   0.1.0 (public release)



Wednesday, May 18, 2011
October 1, 2010

                           0.1.0
                      10 providers,
                      3 contributors
Wednesday, May 18, 2011
April 21, 2011

                          0.2.3
                  36 providers,
                 52 contributors
Wednesday, May 18, 2011
Today

                          master
                  47 providers,
                 76 contributors
Wednesday, May 18, 2011
Wednesday, May 18, 2011
Present!        The now of OmniAuth


Wednesday, May 18, 2011
Wednesday, May 18, 2011
Good News!
                    Weā€™re living in
                     the future*
              *or an unrealeased git branch beta thereof


Wednesday, May 18, 2011
gem ā€˜omniauthā€™,
          :git => ā€˜git://github.com/intridea/omniauth.gitā€™,
          :branch => ā€˜1.0-betaā€™




Wednesday, May 18, 2011
@sferik

Wednesday, May 18, 2011
ā€œ...has commit access to just
          about every repo on GitHubā€

                          - Josh Kalderimis



Wednesday, May 18, 2011
oa-identity
                          Login and Password with
                           OmniAuth Philosophy




Wednesday, May 18, 2011
Inevitable, but
                        diļ¬ƒcult.

Wednesday, May 18, 2011
Avoiding
                          Assumptions

Wednesday, May 18, 2011
Do almost
                           nothing.

Wednesday, May 18, 2011
user model
                e-mail verify
                    fancy
               JUST IDENTITY
Wednesday, May 18, 2011
/auth/identity
           /auth/identity/callback
           /auth/identity/register

Wednesday, May 18, 2011
Identity in action?
                          Socialspring
                           Passport

Wednesday, May 18, 2011
Requirements
                   ā€¢      Social and traditional auth

                   ā€¢      Strict e-mail veriļ¬cation

                   ā€¢      Multiple e-mails, multiple authentications
                          per user

                   ā€¢      Flexible enough to work with LDAP etc. for
                          behind-the-ļ¬rewall installs

                   ā€¢      Automatic account creation based on
                          conļ¬rmed email domains


Wednesday, May 18, 2011
Letā€™s see what
                      happens...

Wednesday, May 18, 2011
[ livecoding ]



Wednesday, May 18, 2011
OmniAuth as
                your only auth*
                          *if you like it that way, like I do.



Wednesday, May 18, 2011
OmniAuth as a
                   Framework

Wednesday, May 18, 2011
Perception

                          Perception


Wednesday, May 18, 2011
image via stopdropandrew.com




             Letā€™s kill the magic.
Wednesday, May 18, 2011
Reality




Wednesday, May 18, 2011
The Guts
                   ā€¢ OmniAuth is just middleware
                   ā€¢ Each provider is a strategy
                   ā€¢ Each strategy is a class
                   ā€¢ Each strategy has phases:
                    ā€¢ Request Phase
                    ā€¢ Callback Phase
Wednesday, May 18, 2011
The User Info Hash
      {
      	
 Ā 	
 Ā ā€œproviderā€	
 Ā =>	
 Ā ā€œfriendfaceā€,
      	
 Ā 	
 Ā ā€œuidā€	
 Ā =>	
 Ā ā€œ123456ā€,
      	
 Ā 	
 Ā ā€œuser_infoā€	
 Ā =>	
 Ā {
      	
 Ā 	
 Ā 	
 Ā 	
 Ā ā€œnicknameā€	
 Ā =>	
 Ā ā€œmbleighā€,
      	
 Ā 	
 Ā 	
 Ā 	
 Ā ā€œnameā€	
 Ā =>	
 Ā ā€œMichael	
 Ā Bleighā€,
      	
 Ā 	
 Ā 	
 Ā 	
 Ā ā€œemailā€	
 Ā =>	
 Ā ā€œmichael@intridea.comā€
      	
 Ā 	
 Ā },
      	
 Ā 	
 Ā ā€œcredentialsā€	
 Ā =>	
 Ā {
      	
 Ā 	
 Ā 	
 Ā 	
 Ā ā€œtokenā€	
 Ā =>	
 Ā ā€œ120942310491asfas-Ā­ā€213-Ā­ā€0123ā€
      	
 Ā 	
 Ā }
      }

Wednesday, May 18, 2011
The Bare Minimum

      {
      	
 Ā 	
 Ā ā€œproviderā€	
 Ā =>	
 Ā ā€œminimalā€,
      	
 Ā 	
 Ā ā€œuidā€	
 Ā =>	
 Ā ā€œ123456ā€,
      	
 Ā 	
 Ā ā€œuser_infoā€	
 Ā =>	
 Ā {
      	
 Ā 	
 Ā 	
 Ā 	
 Ā ā€œnameā€	
 Ā =>	
 Ā ā€œMichael	
 Ā Bleighā€
      	
 Ā 	
 Ā }
      }




Wednesday, May 18, 2011
Request Phase
                            /auth/:provider

                   ā€¢ Requests information of the user
                    ā€¢ For OAuth, redirects to provider
                    ā€¢ For OpenID, requests URL
                    ā€¢ For LDAP, requests user/pass

Wednesday, May 18, 2011
Callback Phase
                            /auth/:provider/callback

                   ā€¢ Creates the user info hash
                   ā€¢ For OAuth, grabs and uses access
                          token to fetch user info
                   ā€¢ For OpenID, parses the response
                   ā€¢ For LDAP, retrieves directory info
Wednesday, May 18, 2011
Enough talk.
                          Letā€™s BUILD!

Wednesday, May 18, 2011
[ livecoding ]



Wednesday, May 18, 2011
Future!
         The whatā€™s next of OmniAuth


Wednesday, May 18, 2011
Fostering
                          Contribution

Wednesday, May 18, 2011
Testing


Wednesday, May 18, 2011
Y U NO HAVE TESTS?




Wednesday, May 18, 2011
API Calls with remote site
        interaction and credential
              requirements.

                   To 40+ diļ¬€erent sites.

Wednesday, May 18, 2011
I had to choose:
                  Test it all, or
                release it ever.

Wednesday, May 18, 2011
Testing is
                     priority #1
                    going forward.

Wednesday, May 18, 2011
SUP DAWG I HEARD YOU LIKE TESTING GEMS




  SO I MADE A GEM TO TEST YOUR GEM AND WROTE
    TESTS FOR IT SO YOU CAN TEST MY GEM FOR
   TESTING YOUR GEM WHILE YOU TEST YOUR GEM
Wednesday, May 18, 2011
Help me. Please.


Wednesday, May 18, 2011
Documentation
         (for contributors)

Wednesday, May 18, 2011
Convenience


Wednesday, May 18, 2011
Massaging
                          Pain Points

Wednesday, May 18, 2011
Rails Integration
             (via a separate gem)


Wednesday, May 18, 2011
Documentation
                  (for users)

Wednesday, May 18, 2011
Moar Strategies
                          (written by not me)



Wednesday, May 18, 2011
Moar Suggestions!


Wednesday, May 18, 2011
Thanks! Questions?
                    http://spkr8.com/t/7512
                    @mbleigh @intridea
               github.com/intridea/omniauth

Wednesday, May 18, 2011

More Related Content

Similar to OmniAuth: From the Ground Up (RailsConf 2011)

Src2011 killer clouds
Src2011 killer cloudsSrc2011 killer clouds
Src2011 killer clouds
Paul Cameron
Ā 
Teaching and Engaging Students
Teaching and Engaging StudentsTeaching and Engaging Students
Teaching and Engaging Students
Danika Barker
Ā 
RailsConf Keynote - History of Ruby
RailsConf Keynote - History of RubyRailsConf Keynote - History of Ruby
RailsConf Keynote - History of Ruby
Dr Nic Williams
Ā 
Writing for people
Writing for peopleWriting for people
Writing for people
freerobby
Ā 
Cornell Food Executives - Rebecca Ryan Presentation
Cornell Food Executives - Rebecca Ryan PresentationCornell Food Executives - Rebecca Ryan Presentation
Cornell Food Executives - Rebecca Ryan Presentation
Rebecca Ryan
Ā 
GR8Conf 2011: Groovy 1.8 update
GR8Conf 2011: Groovy 1.8 updateGR8Conf 2011: Groovy 1.8 update
GR8Conf 2011: Groovy 1.8 update
GR8Conf
Ā 
Doctrine In The Real World sflive2011 Paris
Doctrine In The Real World sflive2011 ParisDoctrine In The Real World sflive2011 Paris
Doctrine In The Real World sflive2011 Paris
Jonathan Wage
Ā 
Create a Professional Blog with WordPress: Chapter 6 Customizing Your Sites w...
Create a Professional Blog with WordPress: Chapter 6 Customizing Your Sites w...Create a Professional Blog with WordPress: Chapter 6 Customizing Your Sites w...
Create a Professional Blog with WordPress: Chapter 6 Customizing Your Sites w...
Atit Patumvan
Ā 
Sean coates fifty things and tricks, confoo 2011
Sean coates fifty things and tricks, confoo 2011Sean coates fifty things and tricks, confoo 2011
Sean coates fifty things and tricks, confoo 2011
Bachkoutou Toutou
Ā 

Similar to OmniAuth: From the Ground Up (RailsConf 2011) (20)

Src2011 killer clouds
Src2011 killer cloudsSrc2011 killer clouds
Src2011 killer clouds
Ā 
Teaching and Engaging Students
Teaching and Engaging StudentsTeaching and Engaging Students
Teaching and Engaging Students
Ā 
beyond&behind
beyond&behindbeyond&behind
beyond&behind
Ā 
Bitcoin for Noobs
Bitcoin for NoobsBitcoin for Noobs
Bitcoin for Noobs
Ā 
Doctrine in the Real World
Doctrine in the Real WorldDoctrine in the Real World
Doctrine in the Real World
Ā 
Machines Talking To Themselves - Internet Of Things 101
Machines Talking To Themselves - Internet Of Things 101Machines Talking To Themselves - Internet Of Things 101
Machines Talking To Themselves - Internet Of Things 101
Ā 
RailsConf Keynote - History of Ruby
RailsConf Keynote - History of RubyRailsConf Keynote - History of Ruby
RailsConf Keynote - History of Ruby
Ā 
Yal bridge socent-examples
Yal bridge socent-examplesYal bridge socent-examples
Yal bridge socent-examples
Ā 
10 Web Development Concepts a Designer Should Know
10 Web Development Concepts a Designer Should Know10 Web Development Concepts a Designer Should Know
10 Web Development Concepts a Designer Should Know
Ā 
Writing for people
Writing for peopleWriting for people
Writing for people
Ā 
Cornell Food Executives - Rebecca Ryan Presentation
Cornell Food Executives - Rebecca Ryan PresentationCornell Food Executives - Rebecca Ryan Presentation
Cornell Food Executives - Rebecca Ryan Presentation
Ā 
Groovy 1.8 update - Guillaume Laforge - GR8Conf Europe 2011
Groovy 1.8 update - Guillaume Laforge - GR8Conf Europe 2011Groovy 1.8 update - Guillaume Laforge - GR8Conf Europe 2011
Groovy 1.8 update - Guillaume Laforge - GR8Conf Europe 2011
Ā 
GR8Conf 2011: Groovy 1.8 update
GR8Conf 2011: Groovy 1.8 updateGR8Conf 2011: Groovy 1.8 update
GR8Conf 2011: Groovy 1.8 update
Ā 
clipperz @ JSE2011
clipperz @ JSE2011clipperz @ JSE2011
clipperz @ JSE2011
Ā 
Webops dashboards
Webops dashboardsWebops dashboards
Webops dashboards
Ā 
Doctrine In The Real World sflive2011 Paris
Doctrine In The Real World sflive2011 ParisDoctrine In The Real World sflive2011 Paris
Doctrine In The Real World sflive2011 Paris
Ā 
iPhone Python love affair
iPhone Python love affairiPhone Python love affair
iPhone Python love affair
Ā 
Create a Professional Blog with WordPress: Chapter 6 Customizing Your Sites w...
Create a Professional Blog with WordPress: Chapter 6 Customizing Your Sites w...Create a Professional Blog with WordPress: Chapter 6 Customizing Your Sites w...
Create a Professional Blog with WordPress: Chapter 6 Customizing Your Sites w...
Ā 
Sean coates fifty things and tricks, confoo 2011
Sean coates fifty things and tricks, confoo 2011Sean coates fifty things and tricks, confoo 2011
Sean coates fifty things and tricks, confoo 2011
Ā 
Speed Dating: How Speeding up your Blog Improves your SEO
Speed Dating: How Speeding up your Blog Improves your SEOSpeed Dating: How Speeding up your Blog Improves your SEO
Speed Dating: How Speeding up your Blog Improves your SEO
Ā 

More from Michael Bleigh

Node.js and Ruby
Node.js and RubyNode.js and Ruby
Node.js and Ruby
Michael Bleigh
Ā 

More from Michael Bleigh (10)

OmniAuth: From the Ground Up
OmniAuth: From the Ground UpOmniAuth: From the Ground Up
OmniAuth: From the Ground Up
Ā 
The Grapes of Rapid (RubyConf 2010)
The Grapes of Rapid (RubyConf 2010)The Grapes of Rapid (RubyConf 2010)
The Grapes of Rapid (RubyConf 2010)
Ā 
Upgrading to Rails 3
Upgrading to Rails 3Upgrading to Rails 3
Upgrading to Rails 3
Ā 
Deciphering the Interoperable Web
Deciphering the Interoperable WebDeciphering the Interoperable Web
Deciphering the Interoperable Web
Ā 
The Present Future of OAuth
The Present Future of OAuthThe Present Future of OAuth
The Present Future of OAuth
Ā 
Node.js and Ruby
Node.js and RubyNode.js and Ruby
Node.js and Ruby
Ā 
Persistence Smoothie: Blending SQL and NoSQL (RubyNation Edition)
Persistence  Smoothie: Blending SQL and NoSQL (RubyNation Edition)Persistence  Smoothie: Blending SQL and NoSQL (RubyNation Edition)
Persistence Smoothie: Blending SQL and NoSQL (RubyNation Edition)
Ā 
Persistence Smoothie
Persistence SmoothiePersistence Smoothie
Persistence Smoothie
Ā 
Twitter on Rails
Twitter on RailsTwitter on Rails
Twitter on Rails
Ā 
Hacking the Mid-End (Great Lakes Ruby Bash Edition)
Hacking the Mid-End (Great Lakes Ruby Bash Edition)Hacking the Mid-End (Great Lakes Ruby Bash Edition)
Hacking the Mid-End (Great Lakes Ruby Bash Edition)
Ā 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Ā 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
Ā 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
Ā 

Recently uploaded (20)

šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜
Ā 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
Ā 
Scaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organizationScaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organization
Ā 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Ā 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Ā 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
Ā 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Ā 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Ā 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Ā 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Ā 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Ā 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Ā 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Ā 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Ā 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Ā 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Ā 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Ā 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
Ā 
Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024
Ā 

OmniAuth: From the Ground Up (RailsConf 2011)

  • 1. OmniAuth: From the Ground Up Michael Bleigh / RailsConf 2011 Wednesday, May 18, 2011
  • 5. OmniAuth github.com/intridea/omniauth Wednesday, May 18, 2011
  • 7. OmniAuth! github.com/intridea/omniauth Wednesday, May 18, 2011
  • 8. Login with anything Wednesday, May 18, 2011
  • 9. Assume nothing* *plus or minus a few small assumptions Wednesday, May 18, 2011
  • 10. Past. Present. Future. Wednesday, May 18, 2011
  • 11. Past! The why of OmniAuth Wednesday, May 18, 2011
  • 12. Why are there so many #&@$! authentication libraries? Wednesday, May 18, 2011
  • 13. devise authlogic clearance sorcery restful-authentication, and so on... Wednesday, May 18, 2011
  • 15. I only need one User model. Users will sign up and provide a password. Only e-mail can validate users. I only need one authentication method. Iā€™m only going to use Rails in my app. I donā€™t have variable deploy targets. I donā€™t want to customize much. Wednesday, May 18, 2011
  • 18. Can we do better? Wednesday, May 18, 2011
  • 19. We need a single, normalized system for authentication. Wednesday, May 18, 2011
  • 20. I Need Auth MAGIC! User Info Wednesday, May 18, 2011
  • 22. It takes a while to make easy things. March 30, 2010 First Commit October 1, 2010 0.1.0 (public release) Wednesday, May 18, 2011
  • 23. October 1, 2010 0.1.0 10 providers, 3 contributors Wednesday, May 18, 2011
  • 24. April 21, 2011 0.2.3 36 providers, 52 contributors Wednesday, May 18, 2011
  • 25. Today master 47 providers, 76 contributors Wednesday, May 18, 2011
  • 27. Present! The now of OmniAuth Wednesday, May 18, 2011
  • 29. Good News! Weā€™re living in the future* *or an unrealeased git branch beta thereof Wednesday, May 18, 2011
  • 30. gem ā€˜omniauthā€™, :git => ā€˜git://github.com/intridea/omniauth.gitā€™, :branch => ā€˜1.0-betaā€™ Wednesday, May 18, 2011
  • 32. ā€œ...has commit access to just about every repo on GitHubā€ - Josh Kalderimis Wednesday, May 18, 2011
  • 33. oa-identity Login and Password with OmniAuth Philosophy Wednesday, May 18, 2011
  • 34. Inevitable, but diļ¬ƒcult. Wednesday, May 18, 2011
  • 35. Avoiding Assumptions Wednesday, May 18, 2011
  • 36. Do almost nothing. Wednesday, May 18, 2011
  • 37. user model e-mail verify fancy JUST IDENTITY Wednesday, May 18, 2011
  • 38. /auth/identity /auth/identity/callback /auth/identity/register Wednesday, May 18, 2011
  • 39. Identity in action? Socialspring Passport Wednesday, May 18, 2011
  • 40. Requirements ā€¢ Social and traditional auth ā€¢ Strict e-mail veriļ¬cation ā€¢ Multiple e-mails, multiple authentications per user ā€¢ Flexible enough to work with LDAP etc. for behind-the-ļ¬rewall installs ā€¢ Automatic account creation based on conļ¬rmed email domains Wednesday, May 18, 2011
  • 41. Letā€™s see what happens... Wednesday, May 18, 2011
  • 43. OmniAuth as your only auth* *if you like it that way, like I do. Wednesday, May 18, 2011
  • 44. OmniAuth as a Framework Wednesday, May 18, 2011
  • 45. Perception Perception Wednesday, May 18, 2011
  • 46. image via stopdropandrew.com Letā€™s kill the magic. Wednesday, May 18, 2011
  • 48. The Guts ā€¢ OmniAuth is just middleware ā€¢ Each provider is a strategy ā€¢ Each strategy is a class ā€¢ Each strategy has phases: ā€¢ Request Phase ā€¢ Callback Phase Wednesday, May 18, 2011
  • 49. The User Info Hash { Ā  Ā ā€œproviderā€ Ā => Ā ā€œfriendfaceā€, Ā  Ā ā€œuidā€ Ā => Ā ā€œ123456ā€, Ā  Ā ā€œuser_infoā€ Ā => Ā { Ā  Ā  Ā  Ā ā€œnicknameā€ Ā => Ā ā€œmbleighā€, Ā  Ā  Ā  Ā ā€œnameā€ Ā => Ā ā€œMichael Ā Bleighā€, Ā  Ā  Ā  Ā ā€œemailā€ Ā => Ā ā€œmichael@intridea.comā€ Ā  Ā }, Ā  Ā ā€œcredentialsā€ Ā => Ā { Ā  Ā  Ā  Ā ā€œtokenā€ Ā => Ā ā€œ120942310491asfas-Ā­ā€213-Ā­ā€0123ā€ Ā  Ā } } Wednesday, May 18, 2011
  • 50. The Bare Minimum { Ā  Ā ā€œproviderā€ Ā => Ā ā€œminimalā€, Ā  Ā ā€œuidā€ Ā => Ā ā€œ123456ā€, Ā  Ā ā€œuser_infoā€ Ā => Ā { Ā  Ā  Ā  Ā ā€œnameā€ Ā => Ā ā€œMichael Ā Bleighā€ Ā  Ā } } Wednesday, May 18, 2011
  • 51. Request Phase /auth/:provider ā€¢ Requests information of the user ā€¢ For OAuth, redirects to provider ā€¢ For OpenID, requests URL ā€¢ For LDAP, requests user/pass Wednesday, May 18, 2011
  • 52. Callback Phase /auth/:provider/callback ā€¢ Creates the user info hash ā€¢ For OAuth, grabs and uses access token to fetch user info ā€¢ For OpenID, parses the response ā€¢ For LDAP, retrieves directory info Wednesday, May 18, 2011
  • 53. Enough talk. Letā€™s BUILD! Wednesday, May 18, 2011
  • 55. Future! The whatā€™s next of OmniAuth Wednesday, May 18, 2011
  • 56. Fostering Contribution Wednesday, May 18, 2011
  • 58. Y U NO HAVE TESTS? Wednesday, May 18, 2011
  • 59. API Calls with remote site interaction and credential requirements. To 40+ diļ¬€erent sites. Wednesday, May 18, 2011
  • 60. I had to choose: Test it all, or release it ever. Wednesday, May 18, 2011
  • 61. Testing is priority #1 going forward. Wednesday, May 18, 2011
  • 62. SUP DAWG I HEARD YOU LIKE TESTING GEMS SO I MADE A GEM TO TEST YOUR GEM AND WROTE TESTS FOR IT SO YOU CAN TEST MY GEM FOR TESTING YOUR GEM WHILE YOU TEST YOUR GEM Wednesday, May 18, 2011
  • 64. Documentation (for contributors) Wednesday, May 18, 2011
  • 66. Massaging Pain Points Wednesday, May 18, 2011
  • 67. Rails Integration (via a separate gem) Wednesday, May 18, 2011
  • 68. Documentation (for users) Wednesday, May 18, 2011
  • 69. Moar Strategies (written by not me) Wednesday, May 18, 2011
  • 71. Thanks! Questions? http://spkr8.com/t/7512 @mbleigh @intridea github.com/intridea/omniauth Wednesday, May 18, 2011