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

v1.0.1 breaks existing integration #76

Open
Deradon opened this issue Aug 23, 2023 · 6 comments
Open

v1.0.1 breaks existing integration #76

Deradon opened this issue Aug 23, 2023 · 6 comments

Comments

@Deradon
Copy link

Deradon commented Aug 23, 2023

Heads-Up: I'll provide more information later.

Issue

We've upgraded omniauth-linkedin-oauth2 to v1.0.1. yesterday and since then have not received successful sign-ins/sign-ups anymore via LinkedIn.

Relevant Stacktrace

OAuth2::Error: invalid_request: Duplicate values defined for "client_secret" parameter
{"error":"invalid_request","error_description":"Duplicate values defined for \"client_secret\" parameter"}

File "/app/vendor/bundle/ruby/3.2.0/gems/oauth2-1.4.11/lib/oauth2/client.rb" line 139 in request
File "/app/vendor/bundle/ruby/3.2.0/gems/oauth2-1.4.11/lib/oauth2/client.rb" line 177 in get_token
File "/app/vendor/bundle/ruby/3.2.0/gems/oauth2-1.4.11/lib/oauth2/strategy/auth_code.rb" line 32 in get_token
File "/app/vendor/bundle/ruby/3.2.0/gems/omniauth-oauth2-1.7.3/lib/omniauth/strategies/oauth2.rb" line 126 in build_access_token
File "/app/vendor/bundle/ruby/3.2.0/gems/omniauth-oauth2-1.7.3/lib/omniauth/strategies/oauth2.rb" line 91 in callback_phase
File "/app/vendor/bundle/ruby/3.2.0/gems/omniauth-2.1.1/lib/omniauth/strategy.rb" line 272 in callback_call
File "/app/vendor/bundle/ruby/3.2.0/gems/omniauth-2.1.1/lib/omniauth/strategy.rb" line 194 in call!
File "/app/vendor/bundle/ruby/3.2.0/gems/omniauth-2.1.1/lib/omniauth/strategy.rb" line 169 in call
File "/app/vendor/bundle/ruby/3.2.0/gems/omniauth-2.1.1/lib/omniauth/builder.rb" line 44 in call
File "/app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/middleware/stack.rb" line 61 in block in call
# ... lots of rails logs
File "/app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/engine.rb" line 530 in call
File "/app/vendor/bundle/ruby/3.2.0/gems/puma-6.3.1/lib/puma/configuration.rb" line 270 in call
File "/app/vendor/bundle/ruby/3.2.0/gems/puma-6.3.1/lib/puma/request.rb" line 100 in block in handle_request
File "/app/vendor/bundle/ruby/3.2.0/gems/puma-6.3.1/lib/puma/thread_pool.rb" line 344 in with_force_shutdown
File "/app/vendor/bundle/ruby/3.2.0/gems/puma-6.3.1/lib/puma/request.rb" line 99 in handle_request
File "/app/vendor/bundle/ruby/3.2.0/gems/puma-6.3.1/lib/puma/server.rb" line 443 in process_client
File "/app/vendor/bundle/ruby/3.2.0/gems/puma-6.3.1/lib/puma/server.rb" line 245 in block in run
File "/app/vendor/bundle/ruby/3.2.0/gems/puma-6.3.1/lib/puma/thread_pool.rb" line 151 in block in spawn_thread
AbstractController::ActionNotFound: Could not find devise mapping for path "/users/auth/linkedin/callback?code=<REDACTED>&state=<REDACTED>".
This may happen for two reasons:

1) You forgot to wrap your route inside the scope block. For example:

devise_scope :user do
get "/some/route" => "some_devise_controller"
end

2) You are testing a Devise controller bypassing the router.
If so, you can explicitly tell Devise which mapping to use:

@request.env["devise.mapping"] = Devise.mappings[:user]

Links

@KevinBerthier
Copy link

Same here

1 similar comment
@yuichi-sato-irm
Copy link

Same here

@murraybo
Copy link

I had the same problem. It was caused by another gem that depended on oauth2 with a version lower than 2.0.

omniauth-linkedin-oauth2 could require a higher version of oauth2 and we would see the conflict on bundle install.

Solution: Look for dependencies to oauth2 and update them.

@decioferreira
Copy link
Owner

I am unable to reproduce this issue given that I cannot create a linkedin application with the "Sign In with LinkedIn" product, which seems to have been deprecated August 1, 2023. Can anyone confirm if there are still application which use this, or are they force to transition to the new OIDC version? If the former, does anyone know how to create or use an application with the deprecated product? Thanks

@azmimuwahid
Copy link

same here also

1 similar comment
@yuichi-sato-irm
Copy link

same here also

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

6 participants