Astro Example
This is an example of how to use Better Auth with Astro. It uses Solid for building the components.
Implements the following features: Email & Password . Social Sign-in with Google . Passkeys . Email Verification . Password Reset . Two Factor Authentication . Profile Update . Session Management
How to run
-
Clone the code sandbox (or the repo) and open it in your code editor
-
Provide .env file with the following variables
//if you don't have these, you can get them from the google developer console. If you don't want to use google sign-in, you can remove the google config from the
auth.ts
file. -
Run the following commands
-
Open the browser and navigate to
http://localhost:3000