How to manage Sign in and Sign up in your DirEasy app.
DirEasy use BetterAuth to manage authentication. supports email/password, GitHub, and Google authentication.
For email login you don't need to have additional settings, if you want to enable other login methods, please follow the steps below to configure them.
For the callback URL, it is https://your-domain.com/api/auth/callback/google or http://localhost:3000/api/auth/callback/google for local development.
.env
GOOGLE_CLIENT_ID=your_google_client_idGOOGLE_CLIENT_SECRET=your_google_client_secret# set to true to enable Google OAuth LoginNEXT_PUBLIC_ENABLE_GOOGLE_OAUTH=true
For the callback URL, it is https://your-domain.com/api/auth/callback/github or http://localhost:3000/api/auth/callback/github for local development.
.env
GITHUB_CLIENT_ID=your_github_client_idGITHUB_CLIENT_SECRET=your_github_client_secret# set to true to enable GitHub OAuth LoginNEXT_PUBLIC_ENABLE_GITHUB_OAUTH=true
Please note that the environment variables are different in development and production environments, make sure to create two different OAuth applications for the production and development environments.