Hi Nuxt community! I recently got a new laptop and I'm trying to create a new project on it. I am running Nuxt as a frontend and Laravel as backend. I cloned the project down from github and imported the SSL key and certificate from the old laptop but they were not accepted. So I created a new certificate and key using:
openssl genrsa 2048 > server.key
chmod 400 server.key
openssl req -new -x509 -nodes -sha256 -days 365 -key server.key -out server.crt
and then i verified it by writing:
openssl s_client -connect {{host}}:443 -servername {{host}} </dev/null | openssl x509 -noout -text
and that seems to working great.
Then I went into nuxt to define the keys in my nuxt config by doing so:
devServer: {
https: {
key: "server.key",
cert: "server.crt",
},
host: "{{host}}",
},
but doing so, i still get errors with the ceriticate:
[cause]: unable to verify the first certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1679:34)
at TLSSocket.emit (node:events:518:28)
at TLSSocket._finishInit (node:_tls_wrap:1078:8)
at ssl.onhandshakedone (node:_tls_wrap:864:12)
at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17)
I am using the nuxt-auth-sanctum package. Anyone has an idea?
Macbook Pro M4
Nuxt V3
Laravel 11