Trigger using auth.id

Hi there,

Could someone please confirm my suspicion that I can’t use auth.id inside a trigger function stack?

I’m currently facing a scenario where I’m using triggers to log the previous versions of a record, and I want to record the user who made the change. However, if auth.id doesn’t seem to be supported within triggers, it might pose a problem.

The reason i'm using a trigger is that some of these records get changed on a lot of different places and this way I have a fool proof method to ensure logging is always present even when someone else takes over development.

Thanks,
Bas

2 replies