boolean-uk / software-developer

0 stars 0 forks source link

auth-client non-freedom branch discrepancy #103

Open Auenc opened 2 years ago

Auenc commented 2 years ago

The auth-client exercise has two tracks students can follow. The main branch, and the freedom branch. The main branch has existing code for students to work from.

Both of these branches rely on the student running the auth-hashing exercise. If a student decides to use the main branch for both of these repositories, there will be a discrepancy between what the requirements suggest the student does, and what will be required to get a working solution.

The first requirement for auth-client wants the student to send a register request. On the successful registration of a user, the student is told to set registerResponse state to the response received by the user. However, the code provided in the main branch of the auth-hashing exercise returns the created user. If the student sets the state to this response, react will throw an error about being unable to render objects.

I would suggest updating the main branch of auth-hashing to return a string such as created user ${createdUser.username} so that when it comes to completing the first requirement of auth-client students will not need to amend their auth-hashing solution.

Alternatively, we could make changes to auth-client so that it expects registerResponse to be an object.