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 摘要。