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.