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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:41:08+00:00 2026-06-10T19:41:08+00:00

I have an application which integrates with facebook via oauth2 devise/warden/omniauth. Everything works find

  • 0

I have an application which integrates with facebook via oauth2 devise/warden/omniauth. Everything works find and I am happy with it.

Now I’m trying to integrate the app with the new facebook appcenter, which basically seems to resolve into getting the user pre authenticated before he gest to my site.

Basically, the user ends on a url like

/?fb_appcenter=1&code=xxxxxx

but devise’ omniauthcontroller is waiting on a different url, namely

/users/auth/facebook/callback

I tried to perform a simple redirect carrying over the code query parameter to the callback url, but I get an “invalid credentials” error.

I believe the issue may be that the redirect_uri used in the call to get an access_token within the oauth2 facebook strategy does not correspond to the one used by facebook itself to generate the initial code, but I have no idea on how I am supposed to change that.

Anyone has suggestions or has solved this in the past?

For what is worth, I’m using an old version of devise (1.4) and omniauth (0.3) but a hint of what the general direction should be, even if with newer versions, would be good enough.

  • 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-10T19:41:10+00:00Added an answer on June 10, 2026 at 7:41 pm

    well it turns out this is impossible with old versions of omniauth, since redirect_uri is hardcoded, but a reasonable trick is to just redirect the user to the standard auth callback (e.g. /auth/facebook/callback).

    This will authenticate the user again, but since he already gave you credentials it will just get through.

    The alternative, and what I endd up doing, is to just get the code from OA’s facebook strategy and reimplement a bit of the OAuth2 functionality, basically exchanging the code with an access token, in the landing page you are using.

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

Sidebar

Related Questions

I am trying to make an application which integrates facebook and twitter. I have
I have a website which i integrate with Facebook (via FBML - JavaScript API).
I have a new MVC application which integrates into a larger pre-existing intranet site.
I have android application in which for a logged facebook user to retrieve in
I have build an android application in which I've integrated faceboook using the facebook-sdk
I have an application, targeting mango devices, which plays music via a BackgroundAudioAgent. As
I have a Rails 3 application using Devise for authentication. Now I need to
I have an asp.net application which is purely build using C#, CSS, Javascript. Now
I have a Spring MVC web application which provides RESTful web services via a
We have a application which integrates a 3rd party scanning component - Dynam .NET

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.