Failed to register a tutor
When trying to register a tutor, an error occurs related to the registerAPI. It seems to stem from the recent MR that changed the API logic.
When trying to register a tutor, an error occurs related to the registerAPI. It seems to stem from the recent MR that changed the API logic.
changed milestone to %0.2: Essential functions ready & corrective feedback
assigned to @DavePikopPokam
mentioned in issue #125 (closed)
Hi @bridubois, I tried to setup the LoginApi and RegisterApi to fix this issue. When I register and login a tutor it seems to work fine, but when I call the getUserApi, it keeps returning a 401 Unauthorized. I think it’s because the token isn’t being sent with the request.
I noticed that the credentials option credentials: 'include' isn’t set, so the cookie doesn’t get sent. This might be why it’s failing. Let me know if I’m missing anything.
I think the way to solve this is to make /tutor/register
to match closer /register
(and especially use Actions
, like +page.server.ts
). Maybe making /register
more modular, to be able to use the common "modules" between the two can also help? Let me know if you have other questions or if you want to work on it together.
marked this issue as related to #125 (closed)
closed