iRoachie
iRoachie
BABetter Auth
Created by iRoachie on 3/26/2025 in #bug-reports
auth.api.getActiveMember does not have type signature for role
@bekacru
3 replies
BABetter Auth
Created by iRoachie on 3/26/2025 in #help
How to get type for permissions
Currently doing this Parameters<typeof authClient.organization.checkRolePermission>[0]['permission'] Would be great to have this like authClient.$Infer.Permission
3 replies
BABetter Auth
Created by iRoachie on 3/11/2025 in #help
authClient.admin.hasPermission always returns 401 unauthorized
@bekacru
7 replies
BABetter Auth
Created by iRoachie on 3/11/2025 in #help
authClient.admin.hasPermission always returns 401 unauthorized
ctx.request has the cookie though
cookie: 'ajs_anonymous_id=%22423a081d-cafe-4fe7-b173-ba4696fe1ebb%22; sidebar_state=true; __next_hmr_refresh_hash__=289; better-auth.session_token=STok9ehDJFlQ054lIwaVOdahwkp4xO0a.1VsmMcrLFjrsUqTIy1QboTyn5WiUxE3yWY4h74mc%2BMo%3D',
cookie: 'ajs_anonymous_id=%22423a081d-cafe-4fe7-b173-ba4696fe1ebb%22; sidebar_state=true; __next_hmr_refresh_hash__=289; better-auth.session_token=STok9ehDJFlQ054lIwaVOdahwkp4xO0a.1VsmMcrLFjrsUqTIy1QboTyn5WiUxE3yWY4h74mc%2BMo%3D',
7 replies
BABetter Auth
Created by iRoachie on 3/11/2025 in #help
authClient.admin.hasPermission always returns 401 unauthorized
Did some console.logs in the .next folder. It seems that session is null in ctx.context.session
7 replies
BABetter Auth
Created by iRoachie on 3/11/2025 in #help
authClient.admin.hasPermission always returns 401 unauthorized
It works only if i set userId
7 replies
BABetter Auth
Created by iRoachie on 3/11/2025 in #help
authClient.admin.hasPermission always returns 401 unauthorized
I tried calling getSession and it returned my session successfully.
7 replies