OAuth2::Error custom_logins/oauth2#callback invalid_grant: Invalid authorization code {"error":"invalid_grant","error_description":"Invalid authorization code"} Dec 8th, 2021, 05:54:43 UTC STACKTRACE gems/oauth2-1.4.7/lib/oauth2/client.rb:127:in `request': invalid_grant: Invalid authorization code {"error":"invalid_grant","error_description":"Invalid authorization code"} (OAuth2::Error) from gems/oauth2-1.4.7/lib/oauth2/client.rb:164:in `get_token' from gems/oauth2-1.4.7/lib/oauth2/strategy/auth_code.rb:30:in `get_token' from app/services/custom_logins/oauth2/auth_client.rb:20:in `get_user_info' from app/models/auth_provider.rb:44:in `get_user_info' from app/controllers/custom_logins/oauth2_controller.rb:21:in `callback' from gems/actionpack-6.1.3.2/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action' from gems/actionpack-6.1.3.2/lib/abstract_controller/base.rb:228:in `process_action' from gems/actionpack-6.1.3.2/lib/action_controller/metal/rendering.rb:30:in `process_action' from gems/actionpack-6.1.3.2/lib/abstract_controller/callbacks.rb:42:in `block in process_action' from gems/activesupport-6.1.3.2/lib/active_support/callbacks.rb:117:in `block in run_callbacks' from gems/actiontext-6.1.3.2/lib/action_text/rendering.rb:20:in `with_renderer' from gems/actiontext-6.1.3.2/lib/action_text/engine.rb:55:in `block (4 levels) in ' from gems/activesupport-6.1.3.2/lib/active_support/callbacks.rb:126:in `instance_exec' from gems/activesupport-6.1.3.2/lib/active_support/callbacks.rb:126:in `block in run_callbacks' from gems/ahoy_matey-3.2.0/lib/ahoy/controller.rb:45:in `set_ahoy_request_store' from gems/activesupport-6.1.3.2/lib/active_support/callbacks.rb:126:in `block in run_callbacks' from gems/activesupport-6.1.3.2/lib/active_support/callbacks.rb:137:in `run_callbacks' from gems/actionpack-6.1.3.2/lib/abstract_controller/callbacks.rb:41:in `process_action' from gems/actionpack-6.1.3.2/lib/action_controller/metal/rescue.rb:22:in `process_action' from gems/actionpack-6.1.3.2/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action' from gems/activesupport-6.1.3.2/lib/active_support/notifications.rb:203:in `block in instrument' from gems/activesupport-6.1.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument' from gems/activesupport-6.1.3.2/lib/active_support/notifications.rb:203:in `instrument' from gems/actionpack-6.1.3.2/lib/action_controller/metal/instrumentation.rb:33:in `process_action' from gems/actionpack-6.1.3.2/lib/action_controller/metal/params_wrapper.rb:249:in `process_action' from gems/searchkick-4.1.1/lib/searchkick/logging.rb:211:in `process_action' from gems/activerecord-6.1.3.2/lib/active_record/railties/controller_runtime.rb:27:in `process_action' from gems/actionpack-6.1.3.2/lib/abstract_controller/base.rb:165:in `process' from gems/actionview-6.1.3.2/lib/action_view/rendering.rb:39:in `process' from gems/actionpack-6.1.3.2/lib/action_controller/metal.rb:190:in `dispatch' from gems/actionpack-6.1.3.2/lib/action_controller/metal.rb:254:in `dispatch' from gems/actionpack-6.1.3.2/lib/action_dispatch/routing/route_set.rb:50:in `dispatch' from gems/actionpack-6.1.3.2/lib/action_dispatch/routing/route_set.rb:33:in `serve' from gems/actionpack-6.1.3.2/lib/action_dispatch/routing/mapper.rb:19:in `block in ' from gems/actionpack-6.1.3.2/lib/action_dispatch/routing/mapper.rb:49:in `serve' from gems/actionpack-6.1.3.2/lib/action_dispatch/journey/router.rb:50:in `block in serve' from gems/actionpack-6.1.3.2/lib/action_dispatch/journey/router.rb:32:in `each' from gems/actionpack-6.1.3.2/lib/action_dispatch/journey/router.rb:32:in `serve' from gems/actionpack-6.1.3.2/lib/action_dispatch/routing/route_set.rb:842:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!' from gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!' from gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from bundler/gems/serviceworker-rails-a81aa1f13871/lib/serviceworker/middleware.rb:35:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/rack-attack-6.5.0/lib/rack/attack.rb:113:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/rack/agent_hooks.rb:30:in `traced_call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/rack/browser_monitoring.rb:33:in `traced_call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/i18n-js-3.8.2/lib/i18n/js/middleware.rb:14:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/warden-1.2.9/lib/warden/manager.rb:36:in `block in call' from gems/warden-1.2.9/lib/warden/manager.rb:34:in `catch' from gems/warden-1.2.9/lib/warden/manager.rb:34:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/rack-2.2.3/lib/rack/etag.rb:27:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/rack-2.2.3/lib/rack/conditional_get.rb:27:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/rack-2.2.3/lib/rack/head.rb:12:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/actionpack-6.1.3.2/lib/action_dispatch/http/permissions_policy.rb:22:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/actionpack-6.1.3.2/lib/action_dispatch/http/content_security_policy.rb:18:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context' from gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/cookies.rb:689:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call' from gems/activesupport-6.1.3.2/lib/active_support/callbacks.rb:98:in `run_callbacks' from gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/callbacks.rb:26:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/bugsnag-6.20.0/lib/bugsnag/integrations/rack.rb:51:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/turbolinks_render-0.9.21/lib/turbolinks_render/middleware.rb:81:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/railties-6.1.3.2/lib/rails/rack/logger.rb:37:in `call_app' from gems/railties-6.1.3.2/lib/rails/rack/logger.rb:26:in `block in call' from gems/activesupport-6.1.3.2/lib/active_support/tagged_logging.rb:99:in `block in tagged' from gems/activesupport-6.1.3.2/lib/active_support/tagged_logging.rb:37:in `tagged' from gems/activesupport-6.1.3.2/lib/active_support/tagged_logging.rb:99:in `tagged' from gems/railties-6.1.3.2/lib/rails/rack/logger.rb:26:in `call' from gems/ahoy_matey-3.2.0/lib/ahoy/engine.rb:22:in `call_with_quiet_ahoy' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/remote_ip.rb:81:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/request_store-1.5.0/lib/request_store/middleware.rb:19:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/request_id.rb:26:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/rails_same_site_cookie-0.1.8/lib/rails_same_site_cookie/middleware.rb:13:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/activesupport-6.1.3.2/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/executor.rb:14:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/ssl.rb:77:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/actionpack-6.1.3.2/lib/action_dispatch/middleware/host_authorization.rb:92:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/railties-6.1.3.2/lib/rails/engine.rb:539:in `call' from gems/newrelic_rpm-6.15.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' from gems/puma-5.3.1/lib/puma/configuration.rb:249:in `call' from gems/puma-5.3.1/lib/puma/request.rb:76:in `block in handle_request' from gems/puma-5.3.1/lib/puma/thread_pool.rb:338:in `with_force_shutdown' from gems/puma-5.3.1/lib/puma/request.rb:75:in `handle_request' from gems/puma-5.3.1/lib/puma/server.rb:437:in `process_client' from gems/puma-5.3.1/lib/puma/thread_pool.rb:145:in `block in spawn_thread'