Closed BrianGilbert closed 4 years ago
I found a solution for this:
export NODE_EXTRA_CA_CERTS='/Users/brian/.tok/tls/ca/ca.crt'
I have added this export to my teminal startup script and can confirm this resolves the issue across multiple reboots of the machine.
It might be worth echoing this information out on tokaido installation?
Glad to hear you fixed this Brian. For now, I don't want to modify the output with this, although I appreciate the suggestion, as I think it just clutters up the output too much with information the user most likely doesn't need.
What happened: Using a tokaido backend and a nuxt project as a decoupled frontend when npm tried to access the local tok site we got errors from npm that the certificate can't be verified
What you expected to happen: npm was able to contact the tokaido backend
How to reproduce it (as minimally and precisely as possible): happy to screenshare this, as hard to replicate without correct setup.
Anything else we need to know?: checking the cert with open SSL shows that it has verification issues
Environment:
Additional context Add any other context about the problem here.
I think this could likely be resolved by changing the certificate creation process to use mkcert (which is supported on windows, linux, and mac) instead https://github.com/FiloSottile/mkcert mkcert is a simple tool for making locally-trusted development certificates. It requires no configuration.
Alternatively you could generate a *.local.tokaido.io cert from a server that letsencryp can access at port 80, and transfer it to the users computer (with the problem of it needing to be updated every 90 days.)
Another alternative (though OS limited probably) https://deliciousbrains.com/ssl-certificate-authority-for-local-https-development/