Back

[SOLVED] E-Mail Verification with Firebase dynamic links

  • 0
  • Self Hosted
  • Accounts
  • Flutter
  • Web
erb_abtis
1 Mar, 2023, 16:38

Hey there,

I am trying to implement the e-mail verification. In general my app uses primarily Flutter (iOS and Android). Maybe in the future I would like to add a web frontend.

So the current state is that I have my SMTP set up. In the Flutter app I trigger the account.createVerification()-Function. As a respond I get a confirmation mail, as a user.

The URL which I would like to use, is a Firebase dynamic link, so I could redirect it to my app with the query parameters as values. My next step would be to use the updateVerification() function within the flutter app and pass the values of the userId and secret query parameters of the link to confirm the verification. My expectation would be, that I that this is possible instead of creating a confirmation page.

The problem is, that it is not allowed to use an URL other than (I think) localhost and the backend URL. I get the following error in the flutter debug console:

TypeScript
AppwriteException: general_argument_invalid, Invalid url: URL host must be one of : localhost, my.backend.url (400)

Other than that: I would also customize the confirmation mail with my labeling. Is that possible?

kind regards <:appwriteheart2:1073243188954935387>

TL;DR
The user was trying to implement e-mail verification using Firebase Dynamic Links in their Flutter app. They wanted to redirect the link to their app with query parameters. However, they were getting an error that only `localhost` and the backend URL were allowed as URLs. They also wanted to customize the confirmation email. The thread ends with the user stating that they were able to solve the issue by adding a web platform called Firebase Dynamic Links with the dynamic link URL. The dynamic links were now accepted and working fine. Additionally, the second question was answered in another forum link provided. Solution: Add a web platform (Flutter web or just a web
Drake
1 Mar, 2023, 17:00

to add an allowed hostname, add a platform to your project. It can be a flutter web or just a web platform.

erb_abtis
1 Mar, 2023, 17:07

Works like a charm. I added a web platform called Firebase Dynamic Links with the dynamic link URL and now the dynamic links are accepted πŸ™‚ . Thanks! <:appwriteheart2:1073243188954935387>

The second question was answered here: https://discord.com/channels/564160730845151244/1074070333436481616

erb_abtis
2 Mar, 2023, 07:36

[SOLVED] E-Mail Verification with Firebase dynamic links

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