Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 711051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:41:29+00:00 2026-05-14T04:41:29+00:00

Rails has the rest autho plugin which works well but is there a solution

  • 0

Rails has the rest autho plugin which works well but is there a solution for incorporating twitter, facebook, google, yahoo, etc…

Seems like each on has its own plugin and demands and mixing them is going to be a mess.

This is for logging in users like how Stackoverflow gets things done not for using the robust features of the APIs.

What I want to do is do what stackoverflow did for login but in rails.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:41:30+00:00Added an answer on May 14, 2026 at 4:41 am

    It’s not too difficult to write your own controller code to connect to each of these services and redirect. For example, to authenticate to twitter using oauth takes two actions and about 20 lines of code total.

    Keep the code for each service separate in it’s own controller.

    def twitter_oauth
      o = Twitter::OAuth.new(your_twitter_consumer_token, your_twitter_consumer_secret, :authorize_path => '/oauth/authenticate', :sign_in => true)
      o.set_callback_url(twitter_cb_url)
      session[:twitter_oauth_request_token] = o.request_token.token
      session[:twitter_oauth_request_secret] = o.request_token.secret
      redirect_to o.request_token.authorize_url
    end
    
    def twitter_oauth_cb
      o = Twitter::OAuth.new(your_twitter_consumer_token, your_twitter_consumer_secret, :authorize_path => '/oauth/authenticate', :sign_in => true)
      if params[:denied]
        redirect_to root_url
      elsif params[:oauth_verifier]
        o.authorize_from_request(session[:twitter_oauth_request_token], 
                                 session[:twitter_oauth_request_secret],
                                 params[:oauth_verifier])
        # look up this user in the db by o.access_token.token 
        # is the user not found? create them, save their token
        # log them in - UserSession.create(user, true)
        redirect_to root_url
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Rails has no way of creating foreign keys in migrations (there are plugins to
Rails has a method form_for which takes a &proc that contains the content present
I'm aware that Rails has a few different levels for logging, but how can
The Paperclip plugin for Rails has a resize option that keeps the image in
My Rails application has a number of tasks which are offloaded into background processes,
My Rails app has some pages which are SSL-required and others which are SSL-optional.
Rails has a nice function, ordinalize , which converts an integer to a friendly
So Rails 3.1 comes with a little-known handy rails g plugin new generator, which
I'm using Rails as a REST server, and one of my models has a
So it seems rails has pretty nice support for timezones, but I've run into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.