Lick A Brick
Lick A Brick
Explore posts from servers
BABetter Auth
Created by rdx on 3/13/2025 in #help
Email verification
An option I can think of is to extend the user table or create a new one and define a column with the datetime of when the verification email was sent. If the datetime is within a certain range of the current datetime you could skip sending the verification email. You can add this check in your function which sends the verification email.
8 replies
BABetter Auth
Created by yoyojoe on 3/13/2025 in #help
Admin Users Count
Hmm... the docs seem kinda confusing to me tbh. At https://www.better-auth.com/docs/plugins/admin#list-users it mentions the parameter filter which accepts an array of objects, but in the example it shows filterField, filterOperator and filterValue as seperate parameters. Should't it be filter: [{ field: "role", operator: "eq", value: "admin"}] what happens if you remove the limit: 1 does it return all 6 users or does it still only return the single admin user?
7 replies
BABetter Auth
Created by Vimes on 3/13/2025 in #help
How to securely host a pg DB for better auth
Have a look @ https://vercel.com/docs/secure-compute. If you are not a enterprise customer they say this: For Pro customers, a range cannot be defined and you must allow all internet traffic. If you wish to restrict access, we recommend using complex passwords and/or a custom header on your outbound requests that can be verified by your backend and set to reject traffic that doesn't contain this header. (source: https://vercel.com/guides/how-to-allowlist-deployment-ip-address)
11 replies
BABetter Auth
Created by Sulek on 3/13/2025 in #help
Issue with Google OAuth in Expo with Hono backend
localhost is 127.0.0.1 as in this is the current device. As per your screenshot your phone expects the server to run on your actual phone which in most cases is not the case. Read the steps in https://www.better-auth.com/docs/authentication/google#get-your-google-credentials carefully. As you have updated the baseUrl you should also update/add the redirect URI at Google Cloud accordingly.
4 replies
BABetter Auth
Created by Eric on 3/13/2025 in #help
Magic Link Tutorial missing something??
Are you sure you followed these steps: https://www.better-auth.com/docs/installation#mount-handler ? This makes sure all routes belonging to better-auth are handled by better-auth
4 replies
BABetter Auth
Created by yoyojoe on 3/13/2025 in #help
Admin Users Count
What are you expecting as the output? You are querying users with the role 'admin', as per your response you have 6 users matching this filter? You are only seeing 1 user because you set the limit to 1. Limit != Filter.
7 replies