Updated with support for client ID and client secret from upstream