Authentication Issues
Debug login, token, and session problems.
Updated
On this page
Common Auth Problems
"Unauthorized" on every request
- Check that
NEXT_PUBLIC_DASH4DEVS_API_KEYis set in.env.local - Verify the key starts with
pk_ - Test with
dash.ping()
Login returns error
- OTP codes expire after 10 minutes
- Check email for the correct code
- Verify the email exists as a customer
Token expired
- Access tokens expire after 24 hours
- The SDK auto-refreshes tokens if a refresh token is available
- Ensure you stored the refresh token from login
See Login / Logout for auth flow details.