Back

Having issues with using a custom domain.

  • 0
  • Self Hosted
  • Auth
  • Web
  • Cloud
vishwa
2 Apr, 2024, 17:05

Its been more than 48 hrs now and the problem still persists. Please help. I am using hostinger for the domain and my webapp is hosted on vercel. I am trying to implement custom domain on appwrite since i had issues with third party cookies while using google auth.

TL;DR
Developers are having issues with using a custom domain for authentication, particularly related to OAuth2 and login methods. Suggestions were made to check network calls in the browser and handle cookies, disable SSR if unnecessary, and ensure frontend settings align correctly. The CNAME appears to be working, and verifying entries in appwrite was recommended as a possible solution.
ideclon
2 Apr, 2024, 17:29

Generally you can’t create a CNAME on a root domain?

vishwa
2 Apr, 2024, 17:54

Oh

vishwa
2 Apr, 2024, 17:54

But hostinger just allowed me to add in a cname

vishwa
2 Apr, 2024, 17:54

How do i fix the issue

Guille
3 Apr, 2024, 14:57

Yeah the third party cookies it solved when your fronted is served from the main domain (www.maindomain.com) and appwrite from a subdomain (appwrite.maindomain.com)

vishwa
3 Apr, 2024, 14:58

ok could you guide me now on how to resolve this problem?

vishwa
3 Apr, 2024, 14:59

is this how it has to be done?

Guille
3 Apr, 2024, 14:59

Is your main domain pointing to your frontend right? do you see a response from your frontend?

vishwa
3 Apr, 2024, 14:59

yes

Guille
3 Apr, 2024, 15:01

Ok, yes I can see that. and appwrite.thepatialahouse.online, is working too but there is no certificate

Guille
3 Apr, 2024, 15:01

So you added a cname entrie in your domain and then added the frontend as platform?

D5
3 Apr, 2024, 15:25

You're using SSR. I think you don't need SSR?

D5
3 Apr, 2024, 15:25

If so, disable it so it's easier

D5
3 Apr, 2024, 15:25

Or wait for 1.5 or handle it with cookies

vishwa
3 Apr, 2024, 15:25

How do i disable it?

D5
3 Apr, 2024, 15:26

"use client";

D5
3 Apr, 2024, 15:26

In the pages

vishwa
3 Apr, 2024, 16:17

But i am already using use client in all the pages

Guille
3 Apr, 2024, 16:28

And what method are you using to login?

vishwa
3 Apr, 2024, 18:27

For google auth?

Guille
3 Apr, 2024, 19:06

oh you're using oauth2... can you check the network call in the browser, when google calls the appwrite callback to create the session, you can check the cookies created as well

ideclon
3 Apr, 2024, 20:21

No, that’s not necessary

D5
3 Apr, 2024, 20:48

Depends on the platform. In this case not. Apologies for the error

vishwa
4 Apr, 2024, 16:00

Sure lemme send it you

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