wasp
wasp copied to clipboard
Find a way to avoid getting 401 from server when user is not logged in
In Wasp, when on a page that requires auth user, client will ask server to get the user via auth/me route, which will then return 401 if user is not authenticated. We just ignore that 401 and go with it.
The thing is, this 401:
- Confuses people, they think it is a potential issue (we had person asking about it in Discord).
- Confuses Cypress (e2e testing): it thinks error happened and test fails unless you explicitly set it to not fail. https://discord.com/channels/686873244791210014/1216893853890510908/1216893853890510908
@Martinsos I would like to resolve this issue. Could you please assign it to me ?
@yashvardhan-verma I can but I am not sure I would advise this as an issue for beginner, it will turn out quite complex if you are contributing to Wasp for the first time!
An example of this confusing a user: https://discord.com/channels/686873244791210014/1261035836409905316/1261285553744121877
Another one: https://github.com/wasp-lang/open-saas/issues/253
Related discord convo: https://discord.com/channels/686873244791210014/1301166568381747250/1301166568381747250 -> it seems to also negatively affect SEO / webpage performance scores, because it seems as if there is an error on the page.