Fix HTTPS error with oauth2callback endpoint