Back

createVerification() in React Native Fails Due to URL Restrictions

  • 0
  • React Native
  • Auth
  • Cloud
zaid.mka
21 Feb, 2025, 15:59

Hi everyone,

TypeScript
I am trying to use account.createVerification(url) in a React Native app, but I keep getting this error:    My verification request looks like this:    But Appwrite only allows specific domains and does not let me use my own hosted verification page.

I’ve tried the following workarounds, but they all fail:

1️⃣ Using an external verification page (Not allowed) 2️⃣ Using a deep link to open the app directly (myapp://verify) (Doesn’t work) 3️⃣ Using an Appwrite Function (Runs on *.appwrite.global, which is also blocked) 4️⃣ Trying to host a page inside Appwrite (No clear way to do this)

TypeScript
So my question is:

How are React Native developers supposed to handle email verification when Appwrite forces verification links to open cloud.appwrite.io, which just shows a login page instead of verifying the email?

the docs say const promise = account.createVerification('https://example.com/verify'); and not limit the url but when try my code await account.createVerification('https://appwrite.zaidmka.com'); its replay this error (NOBRIDGE) LOG Error: [AppwriteException: Invalid url param: URL host must be one of: localhost, cloud.appwrite.io, appwrite.io, *.appwrite.io]

TypeScript
Thanks!
TL;DR
Developers facing issues using account.createVerification(url) in React Native due to URL restrictions set by Appwrite. Various workarounds have been attempted but failed. Appwrite only allows specific domains for verification links. The solution would be to ensure the verification URL matches one of the approved domains (e.g., localhost, cloud.appwrite.io, appwrite.io, *.appwrite.io) to avoid the 'Invalid `url` param' error.
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