1304654
01/03/2022, 4:16 PMchipilov
01/03/2022, 4:19 PM1304654
01/03/2022, 4:20 PMchipilov
01/03/2022, 4:20 PM1304654
01/03/2022, 4:27 PMScott P
01/03/2022, 4:57 PMauth
schema includes a refresh_tokens
table, which includes columns such as revoked
and user_id
.
It might be possible to setup a trigger so that when a new token is added to the refresh_tokens
table, check if it matches a certain user ID, then set revoked
to true
.
You could probably add a column (e.g. banned_until
) to a public.users
table. When the trigger runs, check that table, then check the banned_until
column. If the value is set and the time hasn't yet passed, then set revoked
to true.chipilov
01/03/2022, 6:07 PMchipilov
01/03/2022, 6:08 PMchipilov
01/03/2022, 6:09 PMchipilov
01/03/2022, 6:10 PM