Back

why can't detect login status in client-side even after setting custom domain?

  • 0
  • Auth
  • Web
manazo
18 Mar, 2024, 20:35

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

TL;DR
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.
jesus
18 Mar, 2024, 20:46

Did you register the new sub domain as a new platform in your appwrite

jesus
18 Mar, 2024, 20:46

?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more