You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NEXT_PUBLIC_API_URL=http://localhost:3000 # Optional - defaults to localhost:3000 in dev
13
+
# API token for backend communication (server-side only)
14
+
API_SECRET_TOKEN=your-api-secret-token-here
16
15
```
17
16
18
17
### AUTH_SECRET
@@ -21,24 +20,26 @@ Generate a random secret for Auth.js:
21
20
npx auth secret
22
21
```
23
22
24
-
### NEXT_PUBLIC_API_SECRET_TOKEN
25
-
This should match the API token configured in your backend for accessing the OTP endpoints. Uses `NEXT_PUBLIC_` prefix to make it available in client-side code.
26
-
27
-
### NEXT_PUBLIC_API_URL (Optional)
28
-
Override the default API URL. If not set, it will auto-detect based on environment:
29
-
- Development: `http://localhost:3000`
30
-
- Production: `https://api.flexile.com`
31
-
- Preview: Auto-generated Heroku URL
23
+
### API_SECRET_TOKEN
24
+
This should match the API token configured in your Rails backend for accessing the OTP endpoints. This is kept server-side only for security.
32
25
33
26
## How it Works
34
27
35
-
1.**OTP Request**: User enters email on `/login2` → calls `/api/v1/email_otp` → sends email with OTP
0 commit comments