Rank 3: Container
So I just need to add a web platform with the desired domain even though the apps won't be supported on the web. Thanks, I'll try it out.
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 3: Container
So I just need to add a web platform with the desired domain even though the apps won't be supported on the web. Thanks, I'll try it out.
Rank 2: Process
We must be talking about different things, I mean the Custom Domain from Settings, not the platform
Admin
Right. Custom domain isn't related to this problem
Rank 2: Process
@Ernest you want an email verification to come from https//appwrite.app1.tld and from https//appwrite.app2.tld?
Looks like you might need separate appwrite cloud instances
Rank 3: Container
That's what I wanted clarification on. And I think @Steven answered it somewhat. I think it would be helpful to have different urls for email verification for different projects.
Rank 3: Container
Having multiple appwrite instances just so I can tailor the email verification url for different projects is not ideal
Rank 2: Process
I see your point, with one Appwrite instance we are able to host multiple projects ,but doesn't each project have the ability to use a different custom domain and a different hostname?
I think they do
Admin
What do you mean different urls?
Admin
What do you mean? Emails don't come from a url 🧐
Rank 3: Container
For the flutter sdk to create an email confirmation this is how it's documented:
Future result = account.createVerification( url: 'https://example.com', );Rank 3: Container
The method requires a url and I want to pass different urls to that method for apps in different projects
Rank 3: Container
But for now it requires that the url domain be either localhost or domain.set.in.env
Rank 3: Container
So say I have two projects (fitness app project & ride hailing app project). I want to be able to pass as an example:
Fitness app
Future result = account.createVerification( url: 'https:// fitness.app', );and for ride hailing app
Future result = account.createVerification( url: 'https:// awesomeride.com', );That's basically all I want to do
Rank 3: Container
Also, when a verification email is sent; the userID and token for verification are appended to the passed in url and sent to the user's inbox. I don't want users' of both apps seeing the verification url as https://domain.set.in.env? userId=xxxx&token=yyyyyyyy
Rank 3: Container
@Steven I know the thread is getting long but if you could provide any insight or clarification that'll be super helpful.
Rank 2: Process
@Ernest the domain that your app is sitting on is the one that goes into createVerification(), so if you put in a custom domain in your Appwrite project, say https://fitness.app (you have to have access to https://fitness.app) then you can make your verification endpoint to be https://fitness.app/verify.
Obviously the /verify route should be one that exists in your app and can handle your incoming verification request.
Rank 3: Container
Tried that; didn't work. Got an error saying to use either localhost or domain.set.in.env. Maybe I'm doing something wrong though
Rank 2: Process
I'm using cloud Appwrite for now,
I guess the Appwrite team will advise better on the .env thing.
For me I setup the host in the projects "Platforms" settings, under update hostname.
That worked for me
Admin
It might be confusing when you say custom domain because that's something else in the Appwrite Console.
Admin
Right, so you'll need to add web platforms for those hostnames
Admin
The url in the email will be whatever url you out when you call the create verification method.
Rank 3: Container
Hence the confusion, I thought custom domains were the way to go since it allows the appwrite instance to be accessed using the custom domain set.
Rank 3: Container
Great thanks for clearing that up. I'll be trying it later. Thanks @Steven @Chola
Rank 3: Container
[Solved]Can't use custom domain for email verification url
Rank 3: Container
[Solved] Can't use custom domain for email verification url