Cross
BABetter Auth
ā¢Created by Cross on 4/26/2025 in #help
Privilege elevation?
Hello,
First of all, this is a very nice library ā thank you for your work!
I had a question: is there a way to implement temporary privilege elevation?
I see that there is an admin plugin, but Iām wondering if it's possible to have a system where a regular user can temporarily gain elevated privileges. For example, to access an admin dashboard, instead of creating a separate admin user, a regular user could enter an additional password on a specific page and gain admin privileges for, say, 15 minutes.
Would it be possible to implement something like this, maybe with a custom plugin?
Thanks in advance!
9 replies
BABetter Auth
ā¢Created by Cross on 3/28/2025 in #help
Update TypeScript types of the user ID table
Hello,
I looked at different posts here and I understand that the ID from the user table can't be changed but I've modified my SQLite database schema to use an integer type for the primary id column of the user table (because I did a migration and I need to keep the IDs).
Now, I'm have TypeScript errors when working with this ID (e.g., during comparisons or when fetching user data). TypeScript expects the id to be a string and sometimes an integer, which create a type mismatch.
Can someone help me on how to update the TypeScript types definitions (interfaces, types, etc.) to reflect that the id field should now be a number? (I'm new to typescript, so I don't even know if it is possible ^^)
Thanks in advance š
3 replies