oauth2-basic 插件获取 token 后出现 500 错误

我遇到了一个其他人似乎已经解决的奇怪错误。基本上,我从 API 获得了令牌,但没有进行任何用户详细信息 API 调用。相反,回调 URL 以 500 错误终止,没有任何错误消息。

从日志来看:

OAuth2 Debugging: response status 200

From POST https://developer-dev.api.autodesk.com/authentication/v2/token

Headers:
--- !ruby/hash-with-ivars:Faraday::Utils::Headers
ivars:
  :@names:
    user-agent: User-Agent
    content-type: Content-Type
    authorization: Authorization
elements:
  User-Agent: Faraday v2.14.0
  Content-Type: application/x-www-form-urlencoded
  Authorization: Basic xxx


Body:
--- '{"access_token":"xxxx","token_type":"Bearer","expires_in":3599,"refresh_token":"xxxx"}'

  '

Processing by Users::OmniauthCallbacksController#complete as HTML
  Parameters: {"code"=>"xxx", "state"=>"d77d766602c9302ad6967569883d4c41ef0ac9847d0b85f8", "provider"=>"oauth2_basic"}
OAuth2 Debugging:       after_authenticate response:

      creds:
      ---
token: xxx
refresh_token: xxx
expires_at: 1767886006
expires: true


      uid:

      info:
      ---
name:


      extra:
      --- {}


Completed 500 Internal Server Error in 81ms (ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)

我没有收到任何错误信息。因此,我不确定是什么导致了这个问题。我确保设置了 OAuth2 fetch user details(OAuth2 获取用户详细信息)、OAuth2 user JSON URL(OAuth2 用户 JSON URL)和 OAuth2 JSON user ID path(OAuth2 JSON 用户 ID 路径)等,但我根本没有看到任何 API 调用到用户详细信息 API。

非常感谢任何信息。

顺便说一下,我同时拥有服务器和 Docker 访问权限。有什么可以尝试的调试方法,我可以试一下。