anand248
Explore posts from serversBABetter Auth
•Created by anand248 on 4/7/2025 in #help
Even being owner, getting YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION
got it sorted Ping, I guess, from now onwards, we have to explicitly specify
invitation: ["create"]
in permissions set, and it is not part of defaultStatements
, I am happy to add this explicitly, I am good now.10 replies
BABetter Auth
•Created by anand248 on 4/7/2025 in #help
Even being owner, getting YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION
Thanks, I could not find any such PR - https://github.com/better-auth/better-auth/pulls?q=is%3Apr+is%3Aclosed
Could you please share the PR link, I will try to add my own else.
10 replies
BABetter Auth
•Created by anand248 on 4/7/2025 in #help
Even being owner, getting YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION
Admin is also not being able to invite members.
10 replies
BABetter Auth
•Created by anand248 on 4/7/2025 in #help
Even being owner, getting YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION
I was on 1.2.4, just upgraded again to 1.2.5 and tested again, the same error. This issue was not there till recently.
Thanks for looking into it.
10 replies
BABetter Auth
•Created by anand248 on 3/5/2025 in #bug-reports
Performance of `auth.api.hasPermission` seem to be very slow
But my problem is solved now. My D1 DB was hosted in far location. which I had to fix. Thanks for all the help.
5 replies
BABetter Auth
•Created by anand248 on 3/5/2025 in #bug-reports
Performance of `auth.api.hasPermission` seem to be very slow
thanks for above. I did applied index, but still the issue (absence of indexes should not be the problem since I don't have much data anyway).
When I query the db myself, instead of using
Now I am only using
auth.api.hasPermission
call, it does reduce the time by 1/4 so there is some perf improvement which we can do.Now I am only using
auth.api.getSession
which is slowest, My call look like
const session = await auth.api.getSession({ headers: c.req.raw.headers });
I have configured cookie cache, but that is used on subseuqnt calls I guess.
My setup is - Cloudflare worker + D1 Sqlite + Drizzle ORM.5 replies
BABetter Auth
•Created by anand248 on 12/15/2024 in #help
`autoSignInAfterVerification` is not working for me.
verification email should trigger instantly on sign up.
But it is triggering late, sometime, until user attempts a sign in.
Invitation email does get trigger instantly. Either some issue in the code which trigger verification email or my email sender (Resend) is causing delay somewhere.
6 replies
BABetter Auth
•Created by anand248 on 12/15/2024 in #help
`autoSignInAfterVerification` is not working for me.
Thanks. This
get me going. It also solved the sign in after verification issue.
(One another issue, I am experiencing, is the verification emails do not trigger instantly until user try to sign in again and gets the message that email is not verified.).
6 replies
BABetter Auth
•Created by anand248 on 12/15/2024 in #help
`autoSignInAfterVerification` is not working for me.
Thanks for help. Le me know if you need any other detail.
6 replies
BABetter Auth
•Created by anand248 on 12/7/2024 in #bug-reports
User is not able to ban user, even when he is admin of the org
I get it now. It is
user.role
and opts come from what is passed to admin plugin while configuring as below
I am yet to figure out, how to set this custom role of orgAdmin
at user
table while sending him invite. so that he can ban user4 replies
BABetter Auth
•Created by anand248 on 12/7/2024 in #bug-reports
User is not able to ban user, even when he is admin of the org
I am confused about this particular condition in the source code -
https://github.com/better-auth/better-auth/blob/58ad15dd52aafc747fb8e176b4af2ac573ff2d84/packages/better-auth/src/plugins/admin/index.ts#L85C24-L85C33
Where do we provide
opts
,
I am intending to -
Owner will create org and and will invite many users, he will appoint one of the user as admin
(this sets the membership.role
as admin
, that user should be able to ban user as well.4 replies