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

Invalid credentials #23

Open
ruvaleev opened this issue Oct 30, 2020 · 1 comment
Open

Invalid credentials #23

ruvaleev opened this issue Oct 30, 2020 · 1 comment

Comments

@ruvaleev
Copy link

I had perfectly working omniauth authorization, but recently I have found, that now it is invalid. When I click on "Line" login button, it redirects me to Line side authorization page, and there I click on "Enter" button, and it redirects me back to my site, but instead of authorization, I see this message Could not authenticate you from Line because "Invalid credentials".

I had same error with facebook, but I have added token_params: { parse: :json } and problem is gone. After all I finished without this parameter at all, but anyway - for :line provider it doesn't work. I've tried to add it in initializers/omniauth.rb:

# frozen_string_literal: true

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :line,
    Application.credentials[:omniauth][:line_channel_id],
    Application.credentials[:omniauth][:line_secret_id],
    token_params: { parse: :json }
end

And I have tried to add it to devise.rb (same way as :faceboook provider):


config.omniauth :line, Application.credentials[:omniauth][:line_channel_id],
                         Application.credentials[:omniauth][:line_secret_id],
                         token_params: { parse: :json }

I have tried to change gem omniauth-line version from '0.0.5' to '0.0.3', but it doesn't make sense. The worst of all, I don't know when it has been broken. I suppose after I've added gem 'omniauth-rails_csrf_protection', '~> 0.1' to my Gemfile. But I've already tried to remove it, and nothing changed. Of course I've checked twice the credentials, and it is absolutely correct. But it doesn't work nor in production nor in development mode.

Thank you so much for any help, guys!

@oakbow
Copy link
Contributor

oakbow commented Dec 21, 2020

Can I help you with this?#26

I guess it is cause by updated gem omniauth-oauth2 which is depended by this gem, omniauth-line.

@ruvaleev

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

2 participants