In this blog we will learn how to get access into the admin section of Opencart after requesting for token from third party.
When we request from any admin controller we have a admin controller URL like http://example.com/admin/index.php?route=extension/module/account&token=XdxaPq4y49L7yWDso8ZmIF6yFm0T1Rvh and when we get the token and callback, URL changes to http://example.com/admin/index.php?route=extension/module/account&token=XdxaPq4y49L7yWDso8ZmIF6yFm0T1Rvh by which we redirect to login page as invalid token session.
To overcome with this issue we can simply write like this on that controller after getting token
$location = str_replace('&', '&', $this->url->link('extension/module/account','token=' . $this->session->data['token'], true));
So here we ends with this blog.