CriticalMoments/CMSaasStarter

Issue with Profile Creation: Cross-site POST Form Submission Error

Closed this issue · 2 comments

Hello,

Firstly, I'd like to thank you for making this project available to the community; it's greatly appreciated.

I've been eager to try it out, but I've encountered an issue during the profile creation phase. After successfully logging in, attempting to create my profile results in the following error:

"message": "Cross-site POST form submissions are forbidden"

Additionally, I observed this response from the server:

Failed to load resource: the server responded with a status of 403 () https://my-url.com/account/api?/updateProfile

I'm wondering if this might be related to a missing or incorrect environment variable configuration, particularly regarding the URL setup. Could you provide some guidance on this issue? If there's any additional information or logs that would be helpful, please let me know, and I'll provide them as soon as possible.

Thanks in advance for your time and assistance!

Best regards,

I would agree it’s probably an environment variable. Is the error message literally for “my-url.com”? If so be sure to update the env var where that is set.

Also check Project-URL (PUBLIC_SUPABASE_URL), anon (PUBLIC_SUPABASE_ANON_KEY) and service_role (PRIVATE_SUPABASE_SERVICE_ROLE env vars match your supabase instance.

Hi, thanks a lot for your quick reply!
For some reason it was not working when testing on a GitHub code space but the moment I deployed to Vercel it started working. I am assuming it has to do with some domain redirect happening in the back or something.

Everything is resolved now! Thank you so much. Have a wonderful weekend.