better-auth-authentication
Better Auth authentication flows for TypeScript apps. Use when enabling email/password auth, configuring social providers, or implementing sign-up, sign-in, and verification flows.
Works with
---
name: better-auth-authentication
description: Better Auth authentication flows for TypeScript apps. Use when enabling email/password auth, configuring social providers, or implementing sign-up, sign-in, and verification flows.
license: MIT
---
# Better Auth Authentication
## Goals
- Enable email/password authentication and social providers.
- Implement sign-up, sign-in, sign-out, and verification flows.
- Handle redirects and errors consistently.
## Quick start
1. Enable `emailAndPassword` and configure `socialProviders`.
2. Create a client with `createAuthClient`.
3. Use `signUp.email`, `signIn.email`, `signIn.social`, and `signOut` on the client.
```ts
import { betterAuth } from "better-auth";
export const auth = betterAuth({
emailAndPassword: { enabled: true },
socialProviders: {
github: {
clientId: process.env.GITHUB_CLIENT_ID as string,
clientSecret: process.env.GITHUB_CLIENT_SECRET as string,
},
},
});
```
```ts
import { createAuthClient } from "better-auth/client";
const authClient = createAuthClient();
await authClient.signUp.email({
email,
password,
name,
});
await authClient.signIn.email({
email,
password,
callbackURL: "/dashboard",
});
await authClient.signIn.social({
provider: "github",
callbackURL: "/dashboard",
});
await authClient.signOut();
```
## Email verification
- Provide `emailVerification.sendVerificationEmail` to send the verification link.
- Use `emailAndPassword.requireEmailVerification` to enforce verification before sign-in.
## Social providers
- Configure providers in `socialProviders` with provider-specific credentials.
- Use `signIn.social` to start OAuth flows.
- Pass `callbackURL`, `errorCallbackURL`, and `newUserCallbackURL` for redirects.
## Guardrails
- Call client methods from the client only.
- Keep secrets in server-only env variables.
- Use `rememberMe` to control persistent sessions on email/password sign-in.
## References
- `toolchains/platforms/auth/better-auth/better-auth-authentication/references/email-password.md`
- `toolchains/platforms/auth/better-auth/better-auth-authentication/references/providers.md`More Security skills
azure-cost
microsoft/azure-skills
Azure cost management: query costs, forecast spending, optimize to reduce waste. WHEN: \"Azure costs\", \"Azure bill\", \"cost breakdown\", \"how much am I spending\", \"forecast spending\", \"optimize costs\", \"reduce spending\", \"orphaned resources\", \"rightsize VMs\", \"cost spike\", \"reduce storage costs\", \"AKS cost\". DO NOT USE FOR: deploying resources, provisioning, diagnostics, or security audits.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
azure-messaging
microsoft/azure-skills
Troubleshoot and resolve issues with Azure Messaging SDKs for Event Hubs and Service Bus. Covers connection failures, authentication errors, message processing issues, and SDK configuration problems. WHEN: event hub SDK error, service bus SDK issue, messaging connection failure, AMQP error, event processor host issue, message lock lost, message lock expired, lock renewal, lock renewal batch, send timeout, receiver disconnected, SDK troubleshooting, azure messaging SDK, event hub consumer, service bus queue issue, topic subscription error, enable logging event hub, service bus logging, eventhub python, servicebus java, eventhub javascript, servicebus dotnet, event hub checkpoint, event hub not receiving messages, service bus dead letter, batch processing lock, session lock expired, idle timeout, connection inactive, link detach, slow reconnect, session error, duplicate events, offset reset, receive batch.

