Back

OAuth session not sending trigger for events like session create or users create.

  • 0
  • Functions
  • Auth
gagan
1 Aug, 2024, 11:18

this is basic feature needed for everyone as there is no way to execute a function to send a welcome email, and do some reservations in the databases, this bug prevents Appwrite users for using the OAUTH and other login functionalities itself. also i had verified for the Session create event too for the OAuth it didn't worked for that as well, what am i supposed to do?

TL;DR
Developers are facing issues with OAuth sessions not sending triggers for events like session create or users create. The issue is affecting the ability to create user documents and send welcome emails. To resolve this, developers need to verify the events being used and ensure correct event handling in the function responsible for sign-ups.
Joshi
1 Aug, 2024, 11:34

I have a function that is responsible for sign ups. It listens to these two events "users..create" "users..sessions.*.create"

When the event that triggered is "users.*.create" I will create a user document(among other documents) in appwrite database and send a welcome email.

When the event is "users..sessions..create" I will check if the session.provider is "google" or any other oAuth that I have enabled. If that is the case I will then check if the user has a user document in appwrite database. If not then it means the user just signed up with google and I will create all the user documents and send a welcome email. If the user has a user document already I do nothing.

Joshi
1 Aug, 2024, 11:34
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