better-auth Session Not Recognized After Manual Creation in Telegram Callback
how to customize/translate BASE_ERROR_CODES
and how to replace or customize the error page of better auth?You can pass this to your better-auth config to change the error page: ```ts onAPIError: { errorURL: "/my-err-url"...
Stripe plugin status properties full list?
Email Verification
How to fix Stripe error
How can I get a user from an api key ?
How to access user email or userId in social login hook (Google/Microsoft)?

Can you change callbackURL with requireEmailVerification default option?
How to run the client on a server route as admin
Even being owner, getting YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION
invitation: ["create"]
in permissions set, and it is not part of defaultStatements
, I am happy to add this explicitly, I am good now.Team metadata
Express returns 404 on /then, but responds to /ok
Issues with Skeleton Loading Not Displaying for Session-Based Components
SignedIn
and SignedOut
components to conditionally display content based on whether the user is authenticated. The problem arises when I refresh the website—the skeleton loader for the UserAvatar
component doesn't show as expected during the pending state; instead, the component seems to render as null and immediately displays the UserMenu
.
Here's a brief overview of my implementation:
- SignedIn Component: Displays its children only when there is an active session.
- SignedOut Component: Renders its children only when there's no active session and the session is not pending....
Sign out after revoking current session
getSessionCookie
in the middleware still return a value so it's act like the user is signed in. How can I prevent this ?Ratelimit with Email Verification
Clarification on Email OTP Auth Flows
Email OTP
auth flows.
1. SignIn with OTP
- I have regular credentials setup. Seems like it replaces the password
in credentials? And I would have only an email
field with a button Sign In with Passcode
? Or does this happen in addition to password
kinda like two-factor auth without the twoFactor
plugin.
2. Verify Email
- self explanatory. Sent on Sign Up, user auto Signed In. Authenticated Form to input OTP and resend verification email button.
3. Reset Password
- Is this for currently logged out user it seems? Reset password form with just email
field. This email gets sent with the OTP and a link to your public password change password form: otp
, email
, new password
, confirm new password
? I'm generally familiar with reset links. But I think somewhere in OWASP, OTP are recommended....Redirect for first time user with social sign in
const data = await authClient.signIn.social({
provider: "google", // or any other provider
callbackURL: "/dashboard", // URL for existing users
newUserCallbackURL: "/onboarding", // URL for first-time users
});
const data = await authClient.signIn.social({
provider: "google", // or any other provider
callbackURL: "/dashboard", // URL for existing users
newUserCallbackURL: "/onboarding", // URL for first-time users
});
Drizzle and better auth problem

How can I complete some actions on OAuth authorization before signing the user in?
What is the best approach when handling the protected and unprotected routes
sign in
and sign up
pages with the goal of redirecting any authenticated user straight to the home page (/
). However, when I navigate to either the sign in or sign up page while already having an active session, the page content briefly renders before the redirect occurs. Additionally, I encounter the following error:
Cannot update a component (`Router`) while rendering a different component (`AuthLayout`). To locate the bad setState() call inside `AuthLayout`, follow the stack trace as described in https://react.dev/link/setstate-in-render
Cannot update a component (`Router`) while rendering a different component (`AuthLayout`). To locate the bad setState() call inside `AuthLayout`, follow the stack trace as described in https://react.dev/link/setstate-in-render