Google/Apple OAuth to show continue to "customdomain.com" instead of "appwrite.io"
- 0
- 7
- Auth
- Cloud
hi everyone, I am building a react-native app with expo and appwrite. I have setup an OAuth flow with Google and Apple following this doc (https://appwrite.io/blog/post/google-oauth-expo) and it works, however, when triggered it says continue to appwrite.io I would like to understand how can i set this up so it shows my domain. So instead of saying, "Choose an account to continue to appwrite.io" to say "Choose an account to continue to mydomain.com"
Hi! As per what I know, you can't change appwrite.io to your domain name if you're using OAuth service from Appwrite, as that OAuth client is hosted by Appwrite. And as far I know, currently there isn't any option to setup custom domain for the OAuth flow. So, it will show Appwrite's domain only. And this is not Appwrite's fault, it's something constrained by Google's OAuth security rules only.
However, if you really want your domain name to be there, then you'll have to create your own Google OAuth Client ID from the Google Cloud Console. There you can set up your custom domain name (and logo, etc. ) if you want.
+1
I think try settings like these screenshots. The first screenshot shows what I see when I made the settings in the next 3 screenshots. But mine is a React Web App not ReactNative
hey thanks, for this, it changed the first alert to my domain, but the oath flow is broken now it says redirect uri mistmatch. do you host your domain with appwrite? mine is in aws
From the screenshot, it seems he has added that domain as a custom domain on Appwrite. Am I right <@810214718702616606> ?
- My domain is registered on internetbs.net
- I would say my domain is hosted at Appwrite because all the DNS records it uses are at Appwrite. (ns1.appwrite.zone, ns2.appwrite.zone and a CNAME edge pointing to fra.cloud.appwrite.io) Whereby kilimocare.com is connected to my frontend but through project settings > custom domains I added edge.kilimocare.com (this is the one that is acting as my API ENDPOINT)
- So all the DNS records from appwrite I set them appropriately at the registrars side and waited for verification. (I guess you want to do the same at AWS.
- In Google Authorized redirect URIs, I replaced https://fra.cloud.appwrite.io with https://my-custom-domain
- In the environment variables my API ENDPOINT became https://my-custom-domain/v1
The screenshots are mine to offer guidance. And yes I added that domain as custom domain. Steps: Project > Settings > Custom domain.
hey thank you very much for the detailed description. I dont really want to move my domain hositing to appwrite and i hope i can get away with the subdomain only. I contacted support, if they say anything useful i will update this thread
I don't think you have to move the hosting of your domain to Appwrite. What informed my decision was the fact that the frontend is also hosted on Appwrite sites.
A subdomain should be enough.
If you dont mind, can You help me with Google Auth2.0
I set custom domain for appwrite project: api.getmyself.app but in appwrite google auth the URI still shows https://sgp.cloud.appwrite.io/v1/account/sessions/oauth2/callback/google
I read on appwrite forum that appwrite doesnt support custom domains for authenication, is it true?
is this true? or can we use https://sgp.cloud.appwrite.io/ with https://my-custom-domain/ API ENDPOINT became https://my-custom-domain/v1 like <@810214718702616606> said
You can definitely try what he said. And see if that works for you.
Yeah, tried it and it works. had trouble with firefox browser(for localhost) which would fail after redirecting from auth provider. (disabling enchanced tracking protection fixed it). Works fine in Vivaldi.
Hi anyone can help me out here? https://discord.com/channels/564160730845151244/1457575442134601820
Do you think you need to create this as an independent question? But if it happened changing to a custom domain, you might want to try another web browser. If it works there then you need to delete the cookies in the other browser
Recommended threads
- Backup policies think im on free tier
Cant create more than one policy as im told to ugprade, when clicking upgrade im taken to the upgrade page which confirms im already on pro
- Cant get rid of "get started"
Not that important, but annoying. No matter what I do I cant get the "Get started" to go away, ive added a bunch of web platforms and its just stuck.
- TEAM INVITE
There is a problem with the team invitation. When a user invites other users, that time, the newly created email address they don't get the invite link and old ...