Using Java and Playframework.
My only example is facebook. I store the x509 certificate in my keystore. Eventually (at least once every 10-12 months) the certificate expires and i use openssl to go grab the new one and update the keystore using keytool. Sometimes when I am trying to get the new certificate from the facebook server it doesn't get the new one (likely I imagine because they are updating on all of their different servers/instances).
Either way, this makes it so that I won't be able to allow the use of the facebook login on my site temporarily as I try to retrive and update the certificate.
I have found ways to get the certificate from a request here Get certificate and add it to a Java truststore, when only having https URL? and then save it programatically without keytool here Programmatically Import CA trust cert into existing keystore file without using keytool
I obviously have a lack of understanding as to best practices, but how do others tackle this problem?
Essentially what I am looking for is a way to make it so that there isn't an interrupt in the ability to use facebook login while I am updating the certificate. Or minimizing the interrupt.