Back

[Solved] Fire function when user does his first oauth login.

  • 0
  • Users
  • Accounts
  • Functions
zwarag\\harrys
30 Apr, 2023, 19:30

In my application, users can only login via OAuth. I need to fire a function when they login for the first time to create some tables.

However, it seems that when a user logs in for the first time, appwrite does not recoginize this as a new registered user (see screenshot).

I tried to use the users.*.create event.

TL;DR
There was a thread discussing a problem with firing a function when a user does their first OAuth login on Appwrite. The issue was acknowledged and mentioned to be a known issue on GitHub. A suggested solution was to use the session create event instead. The problem was marked as solved in the thread.
Drake
30 Apr, 2023, 19:39

Yes, this is a known issue: https://github.com/appwrite/appwrite/issues/2406

For now, I would suggest using the session create event instead

zwarag\\harrys
30 Apr, 2023, 20:00

alright thx steven 🙏

zwarag\\harrys
30 Apr, 2023, 20:10

[Solved] Fire function when user does his first oauth login.

D5
22 May, 2023, 21:12

Also when made through the appwrite console it's not being triggered

D5
22 May, 2023, 21:13

Hope a solution is found soon: https://github.com/appwrite/appwrite/pull/3567

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