Skip to content

Redirect after login not working #16

@mpaulopes

Description

@mpaulopes

I'm trying this gem on rails 5.2 and ruby 2.4

Here is my gemfile

gem 'omniauth'
gem 'omniauth-oauth2', '1.3.1' # DO NOT change this! If we update teo 1.4 the SSO doesnt work anymore
gem 'omniauth-wordpress_hosted', github: 'jwickard/omniauth-wordpress-oauth2-plugin'

Everything seems to work fine up to the moment after the login.
Then i get the message bellow

Started GET "/users/auth/wordpress_hosted/callback?state=3e1713c400efca580533b59100907731ccfef150d3e48cdf&code=[FILTERED]" for 127.0.0.1 at 2018-06-15 11:52:33 -0700
I, [2018-06-15T11:52:33.002608 #783]  INFO -- omniauth: (wordpress_hosted) Callback phase initiated.
E, [2018-06-15T11:52:33.012354 #783] ERROR -- omniauth: (wordpress_hosted) Authentication failure! invalid_credentials: OAuth2::Error, <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /oauth/token was not found on this server.</p>
</body></html>

Processing by OmniauthCallbacksController#failure as HTML
  Parameters: {"state"=>"3e1713c400efca580533b59100907731ccfef150d3e48cdf", "code"=>"[FILTERED]"}
Redirected to http://localhost:3000/users/sign_in
Completed 302 Found in 6ms (ActiveRecord: 0.0ms)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions