nodeSolidServer / nodeSolidServer/node-solid-server
User Registration problems via JSON
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing POST requests to /api/accounts/new with form data and application/json, checking redirects, status codes, and response bodies. The change is done when valid registrations receive a useful JSON success response with a 2xx status and invalid registrations continue to return an appropriate error response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100