After update on Auth.users.last_sign_in result in "Database Error Granting User" error
I have a last_sign_in_at column in my user_profiles table, which should be updated via the auth.users table when a user signs in. But seems like if I do any AFTER UPDATE on auth.users, the db gives me an error 500 "Database Error Granting User" (when signing in). Seems like the function isn't the problem, but I could be something to do with the trigger. Eg. After insert work with the same function.
