add: app sdk client auth flow example

This commit is contained in:
trisua 2025-07-19 02:00:04 -04:00
parent 0138bf4cd4
commit 9ccbc69405
9 changed files with 95 additions and 27 deletions

View file

@ -196,8 +196,8 @@ impl DataManager {
let res = query_row!(
&conn,
"SELECT * FROM users WHERE (SELECT jsonb_array_elements(grants::jsonb) @> ('{\"token\":\"' || $1 || '\"}')::jsonb)",
&[&token],
"SELECT * FROM users WHERE grants LIKE $1",
&[&format!("%\"token\":\"{token}\"%")],
|x| Ok(Self::get_user_from_row(x))
);