manazoOriginal post
Rank 3: Container
First of all, i'm trying this from a sub-domain of the actual domain that is set in appwrite as custom domain. the error message i'm getting while trying to fetch current logged in user in the client-side says "Invalid Origin. Register your new client (<MY_CUSTOM_DOMAIN>) as a new Web platform on your project console dashboard" with code 1008. but it works fine in the server side. why is that?
Appwrite: Cloud
Stack: Nextjs@14
Summary
Developers are unable to detect login status in the client-side even after setting a custom domain due to an "Invalid Origin" error. The solution is to register the new sub domain as a new platform in Appwrite. The error message "Invalid Origin. Register your new client (<MY_CUSTOM_DOMAIN>) as a new Web platform on your project console dashboard" with code 1008 indicates this issue. It works fine on the server side. Make sure the new sub domain is registered as a new platform in Appwrite to resolve the problem.