Ruby on Rails - Railscasts PRO #235 Devise and OmniAuth (revised)
Why Stack Overflow recommends it
Stack Overflow users link it as the reference walkthrough for wiring OmniAuth providers like Twitter and Facebook into a Devise app, then use it as the baseline when they hit problems with callbacks and sessions.
Recommended by 2 people across 2 different months, 2015 to 2017.
What it is
A roughly ten-minute Railscasts PRO episode (#235, revised) that starts from a standard Devise setup and adds third-party login with OmniAuth. It covers user validations and keeps normal password sign-in working alongside the social providers. It is presented in Ryan Bates's Railscasts screencast style and republished by the Railscasts Reloaded channel.
What people said
Recommends Amro Abdalla · 2017-09 · Stack Overflow · on “How to make user continue filling the form after allowing access for(facebook, twitter, ...)?”
I watched this video Ruby on Rails - Railscasts PRO #235 Devise and OmniAuth (revised) [this video] and it helped me a lot, I think the answer is sessions or cookies.
Recommends Designer · 2017-10 · Stack Overflow · on “Rails 5 Devise and OmniAuth Twitter setup redirects to sign_in form after authorising app”
I'm trying to install OmniAuth-Twitter on top of my Devise . I'm following this tutorial [this video] but I'm getting an error that I can not find anywhere online. Actually it is not an error, after I Authorise app from Twitter, it redirects to my sign_in form! omniauth.rb Rails.application.config.middleware.use OmniAuth::Builder do provider :twitter, "ididputmykeyhere", "ididputmykeyhere" end routes.rb Rails.application.routes.draw do devise_for :users, :controllers => { :omniauth_callbacks => "omniauth_callbacks" } resources :posts resources :categories root 'posts#index' end omniauth_callbakcs_controller.rb class OmniauthCallbacksController < Devise::OmniauthCallbacksController def twitter # S
Cites Ryzal Yusoff · 2015-12 · Stack Overflow · on “Devise not binding session (Omniauth) in Rails 4”
I use Omniauth with Devise in my rails app. I managed to get the user signed in correctly when they are using omniauth (in this case, facebook). When the user try to login by using their email and password instead of omniauth, the app will still logged the user in but it does not store the session. So, there is no sign out button being shown and the user cannot do the thing that he/she suppose to do. This is my route for user : devise_for :users, path_names: {sign_in: "login", sign_out: "logout"}, controllers: {registrations: 'registrations', omniauth_callbacks: "omniauth_callbacks"}, :skip => [:sessions] as :user do get 'sign-in' => 'devise/sessions#new', :as => :new_user_session post 'sign
Cites AaronG · 2017-08 · Stack Overflow · on “Using the omniauth-twitter gem with devise and rails 5”
I started watching Ryan Bates's tutorial [this video] on how to use Omniauth with devise (rails-cast 235 revised). I am having problems with the user.rb file. What he displays in his tutorial [LINK] devise :omniauthable, # ... def self.from_omniauth(auth) where(auth.slice(:provider, :uid)).first_or_create do |user| user.provider = auth.provider user.uid = auth.uid user.username = auth.info.nickname end end def self.new_with_session(params, session) if session["devise.user_attributes"] new(session["devise.user_attributes"], without_protection: true) do |user| user.attributes = params user.valid? end else super end end def password_required? super && provider.blank? end def update_with_password(par