How to change the authentication provider to Better Auth.
auth
package dependenciesauth
package…
@repo/database
to the auth
package dependencies.
.env.local
file in each Next.js application (app
, web
and api
):
BETTER_AUTH_SECRET
environment variable to the .env.local
file.
auth
package files with the following code:
sign-in.tsx
and sign-up.tsx
components in the auth
package to use the signIn
and signUp
functions from the client
file.
server-only
directive in packages/database/index.ts
temporarily. Ensure you have environment variables set.auth
package to the following: