SlideShare a Scribd company logo
Omniauth Gem




All, Every and                  Authentication
 Everywhere




                 Omni + auth        By
                                    Sumit Munot
How to Use Omniauth to Authenticate Our
                Users?

We Needs to Sign Up For Various Applications and
Sites Separately.

Why?
We have already sign up on many, using different
usernames, that going back to one of them and
trying to remember our credentials is sometimes
impossible.
Now a days, most of the sites offering alternative
way to sign up,

By allowing us to use other sites accounts.
Like
• Google Account
• Twitter
• GitHub
• Facebook

It feels like a long and arduous task.

But fear not, Omniauth is here to help.
Omniauth allows us to easily
integrate more than sixty
 authentication providers!
Preparing Application

Create Rails application
rails new application_name

In GEMFILE add
gem 'omniauth'

Then,
Bundle install
Creating a Provider
How add a provider to Omniauth?

We need to sign up as a developer on
providers site.

Then just we will have to make two settings in
our application regarding
Username and Password.
If you want to use Facebook authentication
head over to
                                             Create new
developers.facebook.com/apps                  app here
and
click on “Create New App”
Getting our App id/ API key and App Secret from settings
Add Provider To The App
      Create a new file under config/initializers called
      omniauth.rb.

Rails.application.config.middleware.use OmniAuth::Builder do

provider :facebook, YOUR_APP_ID, YOUR_APP_SECRET

end


       Create the Controller Session

              $> rails generate controller sessions new create failure
Set path in routes.rb
get '/login', :to => 'sessions#new', :as => :login

match '/auth/:provider/callback', :to => 'sessions#create'

match '/auth/failure', :to => 'sessions#failure'




In Controller app/controllers/sessions_controller.rb just add
def Create

auth_hash = request.env['omniauth.auth']

render :text => auth_hash.inspect

end
Now make sure everything is working.

Point the browser to

localhost:3000/auth/facebook/
Then,

we’ll be redirected to Facebook so we can authorize our app.

We will Authorize it, and we will be redirected back to our app

and see a hash with some information.

In between will be our name, our Facebook user id, and our email, among other things.

If error occurred then,
Change Some Setting in Facebook/apps for site
redirection


                                                      Blank App
                                                      Domains




                                        Change site
                                           URL
Thanks

More Related Content

What's hot

App builder svco-productdeck-basilarackal
App builder svco-productdeck-basilarackalApp builder svco-productdeck-basilarackal
App builder svco-productdeck-basilarackal
Nihal Ismail
 
Salesforce Marketing Cloud connector for Wordpress WooCommerce
Salesforce Marketing Cloud connector for Wordpress WooCommerceSalesforce Marketing Cloud connector for Wordpress WooCommerce
Salesforce Marketing Cloud connector for Wordpress WooCommerce
Webkul Software Pvt. Ltd.
 
How to integrate a subscription form with WordPress using a free plugin?
How to integrate a subscription form with WordPress using a free plugin?How to integrate a subscription form with WordPress using a free plugin?
How to integrate a subscription form with WordPress using a free plugin?
GeniusContacts
 
How to Build Your Own Social Network with Elgg?
How to Build Your Own Social Network with Elgg?How to Build Your Own Social Network with Elgg?
How to Build Your Own Social Network with Elgg?
Jaakko Naakka
 
Directory submission
Directory submissionDirectory submission
Directory submission
Srinivas Sarakadam, SEO expert
 
Urello wcabq
Urello wcabqUrello wcabq
Urello wcabq
Elizabeth Urello
 
Mobile Website Tutorial
Mobile Website TutorialMobile Website Tutorial
Mobile Website Tutorial
PuttiApps
 
Designing REST API
Designing REST APIDesigning REST API
Designing REST API
Joseph Jude
 
Mule roles
Mule rolesMule roles
Mule roles
Son Nguyen
 
Forms authentication in asp dot net
Forms authentication in asp dot netForms authentication in asp dot net
Forms authentication in asp dot net
Pooja Gaikwad
 
Creating an app on Ribily Part 3 flow creation
Creating an app on Ribily Part 3 flow creationCreating an app on Ribily Part 3 flow creation
Creating an app on Ribily Part 3 flow creation
Sagar Kalkhair
 
Beyond the Theme - Using WordPress as an API
Beyond the Theme - Using WordPress as an APIBeyond the Theme - Using WordPress as an API
Beyond the Theme - Using WordPress as an API
David Tufts
 
DevelopmentIntegrationGuides-Warbler
DevelopmentIntegrationGuides-WarblerDevelopmentIntegrationGuides-Warbler
DevelopmentIntegrationGuides-WarblerMark Dunlap
 
Descriptomatic review
Descriptomatic reviewDescriptomatic review
Descriptomatic review
Fred Kong
 
O365con14 - a developer jam with yammer
O365con14 - a developer jam with yammerO365con14 - a developer jam with yammer
O365con14 - a developer jam with yammer
NCCOMMS
 
Joomla Amazon Affiliate
Joomla Amazon AffiliateJoomla Amazon Affiliate
Joomla Amazon Affiliate
Webkul Software Pvt. Ltd.
 
Let's do SPA
Let's do SPALet's do SPA
Let's do SPA
Marek Piasecki
 
JoomlaEXPO: Search Engine Friendly URLs - Azrul.com
JoomlaEXPO: Search Engine Friendly URLs - Azrul.comJoomlaEXPO: Search Engine Friendly URLs - Azrul.com
JoomlaEXPO: Search Engine Friendly URLs - Azrul.com
John Coonen
 

What's hot (19)

App builder svco-productdeck-basilarackal
App builder svco-productdeck-basilarackalApp builder svco-productdeck-basilarackal
App builder svco-productdeck-basilarackal
 
Salesforce Marketing Cloud connector for Wordpress WooCommerce
Salesforce Marketing Cloud connector for Wordpress WooCommerceSalesforce Marketing Cloud connector for Wordpress WooCommerce
Salesforce Marketing Cloud connector for Wordpress WooCommerce
 
How to integrate a subscription form with WordPress using a free plugin?
How to integrate a subscription form with WordPress using a free plugin?How to integrate a subscription form with WordPress using a free plugin?
How to integrate a subscription form with WordPress using a free plugin?
 
How to Build Your Own Social Network with Elgg?
How to Build Your Own Social Network with Elgg?How to Build Your Own Social Network with Elgg?
How to Build Your Own Social Network with Elgg?
 
Directory submission
Directory submissionDirectory submission
Directory submission
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
Urello wcabq
Urello wcabqUrello wcabq
Urello wcabq
 
Mobile Website Tutorial
Mobile Website TutorialMobile Website Tutorial
Mobile Website Tutorial
 
Designing REST API
Designing REST APIDesigning REST API
Designing REST API
 
Mule roles
Mule rolesMule roles
Mule roles
 
Forms authentication in asp dot net
Forms authentication in asp dot netForms authentication in asp dot net
Forms authentication in asp dot net
 
Creating an app on Ribily Part 3 flow creation
Creating an app on Ribily Part 3 flow creationCreating an app on Ribily Part 3 flow creation
Creating an app on Ribily Part 3 flow creation
 
Beyond the Theme - Using WordPress as an API
Beyond the Theme - Using WordPress as an APIBeyond the Theme - Using WordPress as an API
Beyond the Theme - Using WordPress as an API
 
DevelopmentIntegrationGuides-Warbler
DevelopmentIntegrationGuides-WarblerDevelopmentIntegrationGuides-Warbler
DevelopmentIntegrationGuides-Warbler
 
Descriptomatic review
Descriptomatic reviewDescriptomatic review
Descriptomatic review
 
O365con14 - a developer jam with yammer
O365con14 - a developer jam with yammerO365con14 - a developer jam with yammer
O365con14 - a developer jam with yammer
 
Joomla Amazon Affiliate
Joomla Amazon AffiliateJoomla Amazon Affiliate
Joomla Amazon Affiliate
 
Let's do SPA
Let's do SPALet's do SPA
Let's do SPA
 
JoomlaEXPO: Search Engine Friendly URLs - Azrul.com
JoomlaEXPO: Search Engine Friendly URLs - Azrul.comJoomlaEXPO: Search Engine Friendly URLs - Azrul.com
JoomlaEXPO: Search Engine Friendly URLs - Azrul.com
 

Viewers also liked

Devise and Rails
Devise and RailsDevise and Rails
Devise and Rails
William Leeper
 
OmniAuth: From the Ground Up (RailsConf 2011)
OmniAuth: From the Ground Up (RailsConf 2011)OmniAuth: From the Ground Up (RailsConf 2011)
OmniAuth: From the Ground Up (RailsConf 2011)
Michael Bleigh
 
Rails course day 6
Rails course day 6Rails course day 6
Rails course day 6
Al Sayed Gamal
 
Building a Rails API with the JSON API Spec
Building a Rails API with the JSON API SpecBuilding a Rails API with the JSON API Spec
Building a Rails API with the JSON API Spec
Sonja Peterson
 
herokuでfacebookアプリを作ったお話
herokuでfacebookアプリを作ったお話herokuでfacebookアプリを作ったお話
herokuでfacebookアプリを作ったお話
Naoto Koshikawa
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming Convention
In a Rocket
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting Personal
Kirsty Hulse
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
ux singapore
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Stanford GSB Corporate Governance Research Initiative
 

Viewers also liked (9)

Devise and Rails
Devise and RailsDevise and Rails
Devise and Rails
 
OmniAuth: From the Ground Up (RailsConf 2011)
OmniAuth: From the Ground Up (RailsConf 2011)OmniAuth: From the Ground Up (RailsConf 2011)
OmniAuth: From the Ground Up (RailsConf 2011)
 
Rails course day 6
Rails course day 6Rails course day 6
Rails course day 6
 
Building a Rails API with the JSON API Spec
Building a Rails API with the JSON API SpecBuilding a Rails API with the JSON API Spec
Building a Rails API with the JSON API Spec
 
herokuでfacebookアプリを作ったお話
herokuでfacebookアプリを作ったお話herokuでfacebookアプリを作ったお話
herokuでfacebookアプリを作ったお話
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming Convention
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting Personal
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
 

Similar to Omniauth

OAuth Introduction
OAuth IntroductionOAuth Introduction
OAuth Introductionh_marvin
 
Creating a content managed facebook app
Creating a content managed facebook appCreating a content managed facebook app
Creating a content managed facebook app
OS-Cubed, Inc.
 
Introduction to OAuth 2.0 - Part 1
Introduction to OAuth 2.0 - Part 1Introduction to OAuth 2.0 - Part 1
Introduction to OAuth 2.0 - Part 1
Nabeel Yoosuf
 
Introduction to OAuth 2.0 - Part 1
Introduction to OAuth 2.0  - Part 1Introduction to OAuth 2.0  - Part 1
Introduction to OAuth 2.0 - Part 1
Nabeel Yoosuf
 
Facebook SSO.docx
Facebook SSO.docxFacebook SSO.docx
Facebook SSO.docx
ehathis
 
How to create Zoom Meet with Pega
How to create Zoom Meet with PegaHow to create Zoom Meet with Pega
How to create Zoom Meet with Pega
SamuelJude1
 
Facebook Coin
Facebook CoinFacebook Coin
Facebook Coin
Sathiyamoorthi
 
Passport js authentication in nodejs how to implement facebook login feature ...
Passport js authentication in nodejs how to implement facebook login feature ...Passport js authentication in nodejs how to implement facebook login feature ...
Passport js authentication in nodejs how to implement facebook login feature ...
Katy Slemon
 
Integrate facebook using mule esb
Integrate facebook using mule esbIntegrate facebook using mule esb
Integrate facebook using mule esb
Sanjeet Pandey
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
Mihir Shah
 
Intro To Bebo Applications by Thought Labs
Intro To Bebo Applications by Thought LabsIntro To Bebo Applications by Thought Labs
Intro To Bebo Applications by Thought Labs
John Maver
 
Dreamwares_Salesforce Updated
Dreamwares_Salesforce UpdatedDreamwares_Salesforce Updated
Dreamwares_Salesforce Updated
Amit Ahuja
 
Progressive Web Apps - Overview & Getting Started
Progressive Web Apps - Overview & Getting StartedProgressive Web Apps - Overview & Getting Started
Progressive Web Apps - Overview & Getting Started
Gaurav Behere
 
Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
ColdFusionConference
 
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudSharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudDanny Jessee
 
Facebook + Ruby
Facebook + RubyFacebook + Ruby
Facebook + Ruby
Alex Koppel
 
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010,Claims-Based Identity, Facebook, and the CloudSharePoint 2010,Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
Danny Jessee
 
Login Register with Social Account using PHP
Login Register with Social Account using PHPLogin Register with Social Account using PHP
Login Register with Social Account using PHP
AtozWebhelp
 
Dreamwares_SF Expertise
Dreamwares_SF ExpertiseDreamwares_SF Expertise
Dreamwares_SF ExpertiseManidipa Mitra
 
Mule with facebook
Mule with facebookMule with facebook
Mule with facebook
D.Rajesh Kumar
 

Similar to Omniauth (20)

OAuth Introduction
OAuth IntroductionOAuth Introduction
OAuth Introduction
 
Creating a content managed facebook app
Creating a content managed facebook appCreating a content managed facebook app
Creating a content managed facebook app
 
Introduction to OAuth 2.0 - Part 1
Introduction to OAuth 2.0 - Part 1Introduction to OAuth 2.0 - Part 1
Introduction to OAuth 2.0 - Part 1
 
Introduction to OAuth 2.0 - Part 1
Introduction to OAuth 2.0  - Part 1Introduction to OAuth 2.0  - Part 1
Introduction to OAuth 2.0 - Part 1
 
Facebook SSO.docx
Facebook SSO.docxFacebook SSO.docx
Facebook SSO.docx
 
How to create Zoom Meet with Pega
How to create Zoom Meet with PegaHow to create Zoom Meet with Pega
How to create Zoom Meet with Pega
 
Facebook Coin
Facebook CoinFacebook Coin
Facebook Coin
 
Passport js authentication in nodejs how to implement facebook login feature ...
Passport js authentication in nodejs how to implement facebook login feature ...Passport js authentication in nodejs how to implement facebook login feature ...
Passport js authentication in nodejs how to implement facebook login feature ...
 
Integrate facebook using mule esb
Integrate facebook using mule esbIntegrate facebook using mule esb
Integrate facebook using mule esb
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
Intro To Bebo Applications by Thought Labs
Intro To Bebo Applications by Thought LabsIntro To Bebo Applications by Thought Labs
Intro To Bebo Applications by Thought Labs
 
Dreamwares_Salesforce Updated
Dreamwares_Salesforce UpdatedDreamwares_Salesforce Updated
Dreamwares_Salesforce Updated
 
Progressive Web Apps - Overview & Getting Started
Progressive Web Apps - Overview & Getting StartedProgressive Web Apps - Overview & Getting Started
Progressive Web Apps - Overview & Getting Started
 
Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
 
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudSharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
 
Facebook + Ruby
Facebook + RubyFacebook + Ruby
Facebook + Ruby
 
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010,Claims-Based Identity, Facebook, and the CloudSharePoint 2010,Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
 
Login Register with Social Account using PHP
Login Register with Social Account using PHPLogin Register with Social Account using PHP
Login Register with Social Account using PHP
 
Dreamwares_SF Expertise
Dreamwares_SF ExpertiseDreamwares_SF Expertise
Dreamwares_SF Expertise
 
Mule with facebook
Mule with facebookMule with facebook
Mule with facebook
 

Recently uploaded

To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 

Recently uploaded (20)

To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 

Omniauth

  • 1. Omniauth Gem All, Every and Authentication Everywhere Omni + auth By Sumit Munot
  • 2. How to Use Omniauth to Authenticate Our Users? We Needs to Sign Up For Various Applications and Sites Separately. Why? We have already sign up on many, using different usernames, that going back to one of them and trying to remember our credentials is sometimes impossible.
  • 3. Now a days, most of the sites offering alternative way to sign up, By allowing us to use other sites accounts. Like • Google Account • Twitter • GitHub • Facebook It feels like a long and arduous task. But fear not, Omniauth is here to help.
  • 4. Omniauth allows us to easily integrate more than sixty authentication providers!
  • 5. Preparing Application Create Rails application rails new application_name In GEMFILE add gem 'omniauth' Then, Bundle install
  • 6. Creating a Provider How add a provider to Omniauth? We need to sign up as a developer on providers site. Then just we will have to make two settings in our application regarding Username and Password.
  • 7. If you want to use Facebook authentication head over to Create new developers.facebook.com/apps app here and click on “Create New App”
  • 8. Getting our App id/ API key and App Secret from settings
  • 9. Add Provider To The App Create a new file under config/initializers called omniauth.rb. Rails.application.config.middleware.use OmniAuth::Builder do provider :facebook, YOUR_APP_ID, YOUR_APP_SECRET end Create the Controller Session $> rails generate controller sessions new create failure
  • 10. Set path in routes.rb get '/login', :to => 'sessions#new', :as => :login match '/auth/:provider/callback', :to => 'sessions#create' match '/auth/failure', :to => 'sessions#failure' In Controller app/controllers/sessions_controller.rb just add def Create auth_hash = request.env['omniauth.auth'] render :text => auth_hash.inspect end
  • 11. Now make sure everything is working. Point the browser to localhost:3000/auth/facebook/ Then, we’ll be redirected to Facebook so we can authorize our app. We will Authorize it, and we will be redirected back to our app and see a hash with some information. In between will be our name, our Facebook user id, and our email, among other things. If error occurred then,
  • 12. Change Some Setting in Facebook/apps for site redirection Blank App Domains Change site URL