Code review comment for lp:~mardy/ubuntu-system-settings-online-accounts/dash-profile-1589444

Revision history for this message
Paweł Stołowski (stolowski) wrote :

This fixes the basic auth problem, but I see something odd with youtube scope only with run with my confined dash changes - the scope thinks it's not authorized and keeps displaying the login button. The button however doesn't trigger OA backend afaict (there is no output from OAU_LOGGING_LEVEL=2 OAU_DAEMON_TIMEOUT=9999 online-accounts-service), tapping it just re-executes the search.

Youtube scope executes the following code on every search to decide if "Log-in to youtube" button should be displayed:

 for (auto const& status : oa_client_->get_service_statuses()) {
            if (status.service_authenticated) {
                config_.authenticated = true;
                config_.access_token = status.access_token;
                config_.client_id = status.client_id;
                config_.client_secret = status.client_secret;
                break;
            }
        }

        if (!config_.authenticated) {
            std::cerr << "YouTube scope is unauthenticated" << std::endl;
        } else {
            std::cerr << "YouTube scope is authenticated" << std::endl;
        }

And I can see "YouTube scope is unauthenticated" all the time even after I succesfully authenticated, that means status.service_authenticated is false for all services.

« Back to merge proposal