Simulacrum

OAuth and email providers

Configure Google, GitHub, Apple, magic link, and credentials in better-auth for Simulacrum templates.

Enabling providers

In simulacrum.config.ts, list active providers. Generated auth routes mount handlers for each enabled strategy.

typescript
auth: {
  providers: ["google", "github", "magic-link", "credentials"],
},

Google and GitHub

Create OAuth apps with redirect URLs pointing to your deployment (https://yourdomain.com/api/auth/callback/google, etc.). Store client ID and secret in environment variables.

Apple

Add Apple Sign In with the team ID, key ID, private key, and service ID. Test on HTTPS domains; localhost requires Apple’s dev configuration.

Configure your mailing provider so transactional emails deliver sign-in links reliably.

Rotate OAuth secrets after domain changes or credential exposure. Update every environment in lockstep.