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 8739553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:57:37+00:00 2026-06-13T10:57:37+00:00

I have a small Sinatra app that uses Twitter OAuth for authentication. Some time

  • 0

I have a small Sinatra app that uses Twitter OAuth for authentication. Some time between October 8th and today, it stopped working.

The symptom: I get redirected to Twitter, I sign in, I get redirected back to my app, but my app does not recognize me as logged in.

I can rule out my own code (haven’t touched that in a month) and the platform (Heroku is managed, and all the requests look fine).

The relevant part of the code is this (based on this code by Alex Lang):

get '/session_auth' do
  if params[:oauth_verifier]
    access_token = twitter_client.authorize(
      session[:request_token], session[:request_token_secret], oauth_verifier: params[:oauth_verifier])
    if twitter_client.authorized?
      user = db.load(User.to_id(twitter_client.info['screen_name'])) || User.new(login: twitter_client.info['screen_name'], twitter_access_token: access_token.token,
        twitter_secret_token: access_token.secret)
      db.save! user
      session[:user_id] = user.id
    end
  end
  redirect '/'
end

How or where do you start debugging a thing like this?

  • 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-06-13T10:57:38+00:00Added an answer on June 13, 2026 at 10:57 am

    Short answer: I went up the tool-chain from my app to Twitter.

    Twitter sends back an OAuth verifier parameter to my callback action which is used for the authorize call. If the twitter client is authorized after that, the app sets the user_id in the session.

    The authorize and authorized? calls are from the twitter_oauth gem. An updated version was released on October 12, fixing the API call for the authorized? method (see the commit on Github). Jackpot!

    So all I had to do was:

    bundle update twitter_oauth
    

    and everything worked again. The only thing I have yet to find out is why twitter_oauth worked before. I suspect Twitter deprecated part of their API URLs, but I’d like to know for sure.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small app on Heroku's cedar stack that uses two processes. One
I wrote a small app with Sinatra and have some admin routes (/admin/new, admin/edit/2,
I have a small Sinatra app with both a staging and production environment on
I have small web app that generate PDF files as a report. I'm trying
I have a small app using RestKit with a Sinatra-backed server. When I post
I have a small Sinatra application that is calling a library I developed named
I have a small Sinatra app which generates html fragments for me from an
I have a small web application that is currently running on Sinatra . It
We have a requirement to build a small Sinatra app which will capture events
I have small query today I happen to see when I typed a website

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.