nodeSolidServer / nodeSolidServer/node-solid-server

Token refresh 500

未關閉
#1,588 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
JavaScript
星號
1.8k
分支
308
PR 合併指標
30 天內沒有已合併 PR

描述

@michielbdejong I am seeing 500s on the /token endpoint when solid-auth-fetcher tries to renew the token, as well as a 401. The server logs are set to verbose, but don't show the 500, only the 401. I am not sure which headers I can safely include in a message, so opted to not include any. Do you have any suggestions about how to add additional logging to debug this issue more?

Client requests / responses:

POST https://myunderstory.com/token 500
data:
grant_type: refresh_token
refresh_token: REDACTED
client_id: REDACTED

GET https://ian.myunderstory.com/inbox/ 401

Server logs:

2021-04-02T21:24:54.369Z solid:server Display login-required for https://ian.myunderstory.com/private/apps/understory/garden/workspace/default/prefs.ttl
2021-04-02T21:24:56.115Z solid:ACL Using ACL https://ian.myunderstory.com/private/.acl for ./apps/understory/garden/workspace/default/prefs.ttl
2021-04-02T21:24:56.115Z solid:ACL 1 default authentications about https://ian.myunderstory.com/private/ in https://ian.myunderstory.com/private/.acl
2021-04-02T21:24:56.162Z solid:ACL accessDenied: checking access to https://ian.myunderstory.com/private/apps/understory/garden/workspace/default/prefs.ttl by null and origin https://understory.garden
2021-04-02T21:24:56.162Z solid:ACL 1 default authentications about https://ian.myunderstory.com/private/ in https://ian.myunderstory.com/private/.acl
2021-04-02T21:24:56.162Z solid:ACL Checking auth https://ian.myunderstory.com/private/.acl#owner with agent null
2021-04-02T21:24:56.162Z solid:ACL Agent or group: Fail: not public and not logged on.
2021-04-02T21:24:56.162Z solid:ACL The agent/group check fails
2021-04-02T21:24:56.162Z solid:ACL Check failed: User Unauthorized
2021-04-02T21:24:56.162Z solid:ACL accessDenied: modeURIorReasons: ["User Unauthorized"]
2021-04-02T21:24:56.162Z solid:ACL checking http://www.w3.org/ns/auth/acl#Read
2021-04-02T21:24:56.162Z solid:ACL MODE REQUIRED NOT ALLOWED: http://www.w3.org/ns/auth/acl#Read Denying with User Unauthorized
2021-04-02T21:24:56.162Z solid:ACL Read access denied to (none): undefined - Unauthorized
2021-04-02T21:24:56.162Z solid:server Error page because of: { Error: Unauthorized
at AuthenticatedRequest.unauthorized (/opt/solid/node_modules/@solid/oidc-rs/src/AuthenticatedRequest.js:761:19)
at validateExpiry (/opt/solid/node_modules/@solid/oidc-rs/src/AuthenticatedRequest.js:627:22)
handled: true,
statusCode: 401,
realm: 'https://myunderstory.com',
error: 'invalid_token',
error_description: 'Access token is expired',
error_uri: undefined }

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 /token 端點開始,追蹤來自 solid-auth-fetcher 的 refresh-token 請求。將其 500 回應與顯示的 401 堆疊追蹤進行比較,尤其關注 validateExpiry 和 unauthorized 附近的 AuthenticatedRequest.js。完成的標準是能夠重現該失敗,並且相關錯誤會顯示在伺服器記錄中。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript, nodejs
領域
api, authentication, backend
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。