Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect after login not working #16

Open
mpaulopes opened this issue Jun 15, 2018 · 0 comments
Open

Redirect after login not working #16

mpaulopes opened this issue Jun 15, 2018 · 0 comments

Comments

@mpaulopes
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant