KHRM
Explore posts from serversBABetter Auth
•Created by KHRM on 4/12/2025 in #help
Setting Admin Roll With Hook
Got it thanks for clarifying why it was getting 'overridden'
19 replies
BABetter Auth
•Created by KHRM on 4/12/2025 in #help
Setting Admin Roll With Hook
I see fors the option of adminIds in the admin plugin override the role in the database? Or will set their role upon sign up although that kind of wouldn't make sense because you wouldn't know the id in advance
Basically database hooks is the intended way to work with role with admin plugin
If I'm not using admin plugin I could pass it via the sign up or a regular hook?
19 replies
BABetter Auth
•Created by KHRM on 4/12/2025 in #help
Setting Admin Roll With Hook
no particular reason i just want to know if im doing something wrong
if i use hooks or even hard code it in the sign up
it just always is role USER
19 replies
BABetter Auth
•Created by KHRM on 4/12/2025 in #help
Setting Admin Roll With Hook
@Ping still curious about this if you have the chance to check
19 replies
BABetter Auth
•Created by Glen Kurio on 4/16/2025 in #help
How to extend Sing-in & Sign-up body with custom fields?
And set input to true to have it required
5 replies
BABetter Auth
•Created by Glen Kurio on 4/16/2025 in #help
How to extend Sing-in & Sign-up body with custom fields?
Yes you add additional fields to user in the auth config
5 replies
BABetter Auth
•Created by codecret | Software Engineer on 3/18/2025 in #help
403 error when listing user from superadmin role
i went through all this work to make a wrapper haha
9 replies
BABetter Auth
•Created by codecret | Software Engineer on 3/18/2025 in #help
403 error when listing user from superadmin role
aww i didnt know you can pass an array of strings to additionalFields
9 replies
BABetter Auth
•Created by paul_11097 on 4/14/2025 in #help
magic link sendMagicLink using astro request is undefined
curious what do you need request for, I ended up using using just the email and URL for my needs
6 replies
BABetter Auth
•Created by KHRM on 4/12/2025 in #help
Setting Admin Roll With Hook
this is how sign up is being called originally for reference although i assume this happens before the hook
19 replies
BABetter Auth
•Created by KHRM on 4/12/2025 in #help
Setting Admin Roll With Hook
Pretty sure I did console logging throughout the hook
I can try again since I moved the logic for role to database hooks
I added the name just to show a 1-1 parallel and the name does get changed
19 replies
BABetter Auth
•Created by Risatoga on 3/18/2025 in #help
Change password from the server
ahh the headers thing always gets me
6 replies
BABetter Auth
•Created by KHRM on 4/12/2025 in #help
Typing Role
yes I have this setup, was trying to get to be more verbose on what literal strings a role can be i.e. 'user' , 'mod', 'admin'
13 replies
BABetter Auth
•Created by KHRM on 4/11/2025 in #help
Implementing User Roles
bump
I believe the reason is I did not pass headers in the function
So if I want to check if the currently logged in user has permission
I can do either one of the following right?
pass the headers
OR
Pass the userId if I called getSession earlier in the code?
6 replies
BABetter Auth
•Created by Al.exe on 3/26/2025 in #help
Conflict between Admin and Anonymous plugins – 500 error
do we need to add the addiitonalFields role if we are using the admin plugin
9 replies
BABetter Auth
•Created by KHRM on 4/11/2025 in #help
Implementing User Roles
@KiNFiSH are you able to help, i made a simpler approach
but when i log in with a user who has user.session.role === 'user'
this fails
6 replies