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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:55:56+00:00 2026-06-02T11:55:56+00:00

I am working on an application that allows user to authenticate with Devise and

  • 0

I am working on an application that allows user to authenticate with Devise and Omniauth and then connect his social network account to the app. I wanted to add WordPress integration (their website states they support OAuth 2.0 authentication and REST API access).

Unfortunately, there was no Omniauth strategy for this provider. I looked into some other gems and decide to write my own – it didn’t seem so complicated. The source code can be found here.

I have added all required informations (according to WordPress docs), then I have signed up for an app ID and secret. I have encountered my first problem here – WordPress demanded a live, public domain as a redirect URI. I didn’t want to use one – I wanted to test in development mode first, so localhost was fine for me. I have entered a dummy address, then changed it back to localhost (surprise! They didn’t validate it on update, just on create).

I have added the credentials to my initializer (config/initializers/devise.rb):

config.omniauth :wordpress, "my_app_id", "my_app_secret"

It seemed to work – I got the authentication dialog I expected, it mentioned my application. But when I clicked ‘Authorize’ and got redirected to my application back, I got an error saying invalid credentials.

I have checked the credentials, but they were correct (no typos, proper order). I have reset the app secret – no luck. I have created two another applications, but still nothing.

I have already ran out of ideas. What can cause such error? Is it possible that it’s because of the local address in redirect_uri?

  • 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-02T11:55:57+00:00Added an answer on June 2, 2026 at 11:55 am

    I suspected it was something easy to miss, and it was. WordPress’ server responded with JSON string, but the response was not parsed as one. Therefore Omniauth gem couldn’t find an access token in it and was raising the invalid credentials error. Setting up correct content type worked like a charm.

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

Sidebar

Related Questions

I have an Android application that allows the user to connect to his Facebook
I'm working with a simple app, that allows user to enter some text, then
I'm working on an application that allows the user to send a file using
I am working on a YouTube web application that allows the user to use
I'm working on an asp.net application that allows the user to update data for
I'm working on an application that allows users to generate university schedules and then
I need to do an application that allows the final user to create his
I'm currently working on a web application that allows the user to upload files
I'm about to start working on a PHP application that allows a user to
I'm currently working on an app that allows the user to play (automatically scroll)

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.