nodeSolidServer / nodeSolidServer/node-solid-server

User Registration problems via JSON

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

還沒有人認領這個 Issue。

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

描述

I want to be able to register users through the solid server api via the /api/accounts/new endpoint. Using python I could do the following:

import requests

data = {
    'email': '...valid email',
    'username': '...valid username',
    'name': '...valid name',
    'password': '...valid password'
}
url = 'https://mysolidserver.com/api/accounts/new'
response = requests.post(url, data=data)
print(response.status_code) # which is 401

I am given a status code of 401 since I'm redirected to the username.mysolidserver.com page. This is awkward API UX since I'm expecting a confirmation response, probably in JSON with a status code in the 200's. Moreover, if I set headers={'Content-Type': 'application/json'} in the request, I am given an error claiming that the username is not valid.

Fortunately if the registration doesn't work, I'm given a status code of 400, so I can use this fact right now in my app.

貢獻指南

開啟貢獻指南

從這裡開始

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

研究方向

首先使用表單資料和 application/json 重現向 /api/accounts/new 發送的 POST 請求,檢查重新導向、狀態碼和回應本文。當有效註冊收到具有 2xx 狀態的實用 JSON 成功回應,且無效註冊繼續傳回適當的錯誤回應時,此變更即完成。

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

評估

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

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

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