I have a cloud function which should create a new user document as soon as user otp validation completes successfully. But when i create user from appwrite cloud , it seems to add that document and when i add a user from my app , the event doesnt trigger. Problem 1 = Function not executed as event not triggering Problem 2 = How to create a document only when user validates/verifies otp successfully.
Use users.*.verification.*update to trigger the function when the as soon as the user otp validation successfully completes. It's the last part in this section of the documentation https://appwrite.io/docs/events
there is no users.*.verification.*update option in appwrite cloud
Hi - are you using the private cloud beta? just to confirm
yes
How to create a document only when user validates/verifies otp successfully
Would you please clarify what you're looking for? Do you want the function to execute on https://appwrite.io/docs/client/account?sdk=web-default#accountUpdatePhoneSession or https://appwrite.io/docs/client/account?sdk=web-default#accountUpdatePhoneVerification?
update phone verification
basically i need to create an user document when the user successfully logs in first time in our application
it should not trigger for sessions as it will be many times for a particular user.
@Steven can u please let me know what is the best way to this simple step.
I suggest triggering on session creation but you can do some logic to make sure the rest of your function only executes once for the user
ok sir.. but this should be fixed as that would be regular requirement for all. Or basically we can provide (enable) a simple option in settings/cli to create a user document in a user named collection whenever a user is done verified in auth user.
Thanks btw for saving my time again
Happy to help!
Recommended threads
- executeFunction intermittently throws Fo...
Environment: Flutter app using the Appwrite Flutter SDK, calling executeFunction for [describe endpoint, e.g. live-stream-related function]. *Description*: Int...
- How to update from 1.8.1 to 1.9.6
Due to the number of issues reported in version 1.9.5, I am hesitant to proceed with the update. Could anyone advise if version 1.9.6 is stable and resolves tho...
- HTTP Error 500 ''
Hello to everyone, I'm a Flutter developer and actually I'm developing an app using Appwrite.. during my tests and also massive ones I've noticed something we...