I recently pulled a project from our company repository and configured the environment variables. After executing the build and dev commands, I noticed the certificate directory was created but stayed empty.
The application throws a 403 error when trying to load user data. I attempted to generate certificates manually using mkcert but the same issue persists. How can I resolve this on a Windows environment?
make sure your config is set up for HTTPS. try adding HTTPS=true in your .env. also, mkcert needs to generate certs in the right place. sometimes, company firewalls mess this up too, so check if that’s the case!
Had this exact problem last month! The empty certificate directory means the build process can’t establish SSL context when starting the dev server. Check if NODE_ENV is set right and make sure your dev server can write to the certificate directory. Running terminal as admin fixed the permission issues for me on Windows. Also, check if your antivirus is blocking certificate generation - Windows Defender flags mkcert operations sometimes. Try turning off real-time protection temporarily during setup.
Classic certificate trust issue mixed with path problems. Windows is pickier about certificate validation than other platforms, and that 403 screams SSL cert troubles during auth. First, run mkcert -install again as admin to make sure it’s actually installing the root cert in Windows’ certificate store. Empty certificate directories usually mean the build process can’t find or access the cert path you’ve configured. Check your webpack or Next.js config files - look for hardcoded certificate paths that don’t match your Windows setup. Also double-check your NEXT_PUBLIC_AUTH_URL environment variable. If it’s pointing to HTTPS but your local certs aren’t set up right, the auth service will throw 403 errors. Try switching to HTTP temporarily for local dev. That’ll tell you if this is purely a certificate problem or if there’s something else broken with authentication.