How can I run a hook after the Google OAuth flow?
Hey, I'm in the process of migrating my previous custom auth logic to better-auth.
I'm using better-auth on my Hono backend. I need to execute logic after the user completes the Google OAuth flow, I need to recreate a Postgres materialized view adding the newly create user. Previously I just had this logic in the handler itself but now I'm not sure where to add this logic.
I'm trying to add this logic to a hook like so:
  },
but this for some reason is never running.
What's the proper way to add some logic to a step of the auth flow?
0 Replies