Authentication
Unlock interactive features for your users with Better Auth.
Unique SignIn modal
The SignIn modal will be called everytime it's needed (Connect button or interaction with auth-only features)
It will update with your data automatically but you can customize it the way you want in the /components/layout/sign-in-modal.tsx file.

Setup
Fill your .env file:
Enter any string or generate a unique one with this Generator.
Social Authentication
Google Auth is already pre-implemented, simply follow this guide:
Create a new project on Google Cloud
Access
APIS & Services>Credentials>Configure Consent ScreenFill in all the info.
Add
userinfo.emailanduserinfo.profileto scope and SubmitOn
Credentials, click Create Credentials > OAuth Client IDOn
Web Applicationadd:Authorized JavaScript Origins> http://localhost:3000 & https://[YOURDOMAIN].comAuthorized redirect URLs> http://localhost:3000/api/auth/callback/google & https://[YOURDOMAIN].com/api/auth/callback/google
Submit
OAuth Consent Screen> Publish App
Finally, copy your Client ID and Client Secret to the .env file:
Google Auth SignIn is now fully functional!
Magic Link
To enable this option, you need an email SMTP server, provided here by Loops.
π Check the Emails section to get started.
Your email SignIn is now fully functional!
Polar Integration
Better Auth now includes Polar integration for seamless payment flows:
Features:
Automatic customer creation on signup
Integrated checkout flows
Customer portal access
Webhook handling for payments
Last updated