private static function saveCredentials($key, $credentials)
    {
        $ttl = ($credentials->expires_in / 60) - 2;

        Core::instance()->cache()->put($key, $credentials->access_token, $ttl);
    }