#Cloud function Issue

29 messages · Page 1 of 1 (latest)

warm dome
#

I made a cloud function using nodejs in appwrite which runs on event users.*.create. This cloud function creates the user record in my custom user collection in appwrite,
When i am signing up with email and password, its working fine. But when i am logging in with google. Its not creating the record in collection. I also tried deleting my gmail id from auth in appwrite and then retried logging in with gmail.

Still its not working. Any idea why it is happening

noble yacht
warm dome
#

I was trying with session create as well but info about user not coming in the event data. For example like in case of user create i am getting name, email of the user in the event data which i am storing in my custom collection but in case of session create in json it's not coming.

noble yacht
warm dome
#

I am getting this object in event data

#

its only containing userId

noble yacht
noble yacht
warm dome
#

i needed email and name also which is associated with the gmail login

#

its not coming there

noble yacht
warm dome
#

using Accounts API right

noble yacht
warm dome
#

Oops got it

#

Thanks

#

Will try this

#

Also I see in console functions deployment and executions both are sorted in wrong direction it should be descending order by latest created on first row. Is there any issue already ?

noble yacht
warm dome
#

Ok thanks.

#

Also cloud function is working fine now on google sign in as well using session create event. Thanks for the help

warm dome
#

@noble yacht one issue is there i noticed like when i am signing in with google or creating account using signup with email and password

#

cloud function is not running instantly and because of that in UI am not able to see user info as i am fetching it from custom collection for about 30-50 seconds

#

Maybe i will have to do all this in client side storing user in custom collection after user signup or login with google. What do you think ?

warm dome
#

max 15-25 seconds i believe

noble yacht
warm dome
#

I ran it now again it toom around 30 seconds

#

took*

noble yacht