The Comodo Extended Validation Secure Server Certificate Authority (CA) SHA-1 version V3 certificate is not trusted by ArcGIS Online from version 3.8 onwards. This results in the inability of the token page to pass through the ArcGIS Online sharing proxy, returning the authentication prompt, "Unable to access authentication service."
Log in and access the REST page for the server before utilizing ArcGIS Online. This generates a token directly without passing the sharing proxy which can then be recognized in the short term by ArcGIS Online.