Skip to content

Instantly share code, notes, and snippets.

@rezahussain
Created February 7, 2021 23:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rezahussain/f73318319a4d9886e38935c416c5d5a7 to your computer and use it in GitHub Desktop.
Save rezahussain/f73318319a4d9886e38935c416c5d5a7 to your computer and use it in GitHub Desktop.
// https://medium.com/@jonsamp/how-to-set-up-https-on-localhost-for-macos-b597bcf935ee
// cd ~/
// mkdir .localhost-ssl
// create a self signed key and certificate with next command
// sudo openssl genrsa -out ~/.localhost-ssl/localhost.key 2048
// sudo openssl req -new -x509 -key ~/.localhost-ssl/localhost.key -out ~/.localhost-ssl/localhost.crt -days 3650 -subj /CN=localhost
// now you have to drag and drop the crt file into your keychain app, so when the browser opens the callback https://localhost url, it doesnt
// think that the self signed ssl cert for localhost that we just generated is a mitm attack
// stuff is here:
// ~/.localhost-ssl/localhost.crt
// ~/.localhost-ssl/localhost.key
// for some reason I had to move them to the desktop before the app got permissions to read them :\
// "/Users/admin/Desktop/localhost-ssl/localhost.crt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment