@vtsanev opened this issue on March 15th 2016

When you use token_auth for authentication on Piwik dashboard the gadgets don't open with error meesage: "Error: You can't access this resource as it requires an 'view' access for the website id = X" We do a redirection from our site to our Piwik instance specifying good idSite and token_auth: http://our_piwik_domain/index.php?module=CoreHome&action=index&idSite=X&period=day&date=yesterday&token_auth=some_user_token

The user information is actually loaded but the gadgets don't open. I've found out a way to fix the problem: In broadcast.js(line 491):

var ajax = new ajaxHelper();
ajax._getDefaultPostParams = function () {
    return {};

The function _getDefaultPostParams from ajaxHelper.js is overwritten in broadcast.js. When I remove the overwritten version in broadcast.js it works good.

@tsteur commented on March 16th 2016

To log them in via redirect directly the logme feature is supposed to be used see http://piwik.org/faq/how-to/faq_30/

Only specifying the token_auth is not supposed to work for this. However, the token_auth can be used for exported widgets and in API calls, but not to log someone in.

This issue was closed on March 16th 2016
Powered by GitHub Issue Mirror