Skip to content

Commit 07f32c7

Browse files
committed
DEV-1264: better-auth
1 parent 061ac1d commit 07f32c7

28 files changed

+9424
-1184
lines changed

.env.example

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example configurations via environment variables (sse README.md | Configuration):
1+
# Example configurations via environment variables (see README.md | Configuration):
22

33
# Example configuration via JSON:
44
NEST_SERVER_CONFIG='{
@@ -25,3 +25,40 @@ NEST_SERVER_CONFIG='{
2525

2626
# Example configuration via single Nest Server Config environment variables:
2727
NSC__EMAIL__DEFAULT_SENDER__EMAIL=jon.doe@ethereal.email
28+
29+
# =============================================================================
30+
# Better-Auth Configuration (optional - for modern authentication)
31+
# =============================================================================
32+
33+
# Better-Auth secret (minimum 32 characters, required when enabled)
34+
BETTER_AUTH_SECRET=your-secret-key-that-is-at-least-32-characters-long
35+
36+
# Better-Auth base URL (your application URL)
37+
BETTER_AUTH_URL=http://localhost:3000
38+
39+
# Two-Factor Authentication
40+
TWO_FACTOR_ENABLED=false
41+
TWO_FACTOR_APP_NAME=MyApp
42+
43+
# Passkey/WebAuthn
44+
PASSKEY_ENABLED=false
45+
PASSKEY_RP_ID=localhost
46+
PASSKEY_RP_NAME=MyApp
47+
48+
# Social Login - Google
49+
SOCIAL_GOOGLE_CLIENT_ID=your-google-client-id
50+
SOCIAL_GOOGLE_CLIENT_SECRET=your-google-client-secret
51+
52+
# Social Login - GitHub
53+
SOCIAL_GITHUB_CLIENT_ID=your-github-client-id
54+
SOCIAL_GITHUB_CLIENT_SECRET=your-github-client-secret
55+
56+
# Social Login - Apple
57+
SOCIAL_APPLE_CLIENT_ID=your-apple-client-id
58+
SOCIAL_APPLE_CLIENT_SECRET=your-apple-client-secret
59+
60+
# Rate Limiting for Better-Auth endpoints
61+
RATE_LIMIT_ENABLED=true
62+
RATE_LIMIT_MAX=10
63+
RATE_LIMIT_WINDOW_SECONDS=60
64+
RATE_LIMIT_MESSAGE="Too many requests, please try again later."

0 commit comments

Comments
 (0)