简体   繁体   中英

Opencart - Prevent admin logout issue while redirecting from google API?

I need to get data from Google drive. So I've written an API call in my admin page controller.

Once the page is loaded, it get redirected to google authentication page where we need to confirm authentication. So after authentication, it gets redirected to the admin page, but as the token parameter is missing it gets logged out. It's possible to pass token parameter to api call as parameter name - 'state' ( google oauth2 redirect_uri with several parameters ) in API call and I will get it back in the response as get param 'state'.

How can I MAP parameter name 'state' to 'token' in my admin controller to prevent the Logout issue?

将Oauth重定向uri设置为包括当前令牌,或者可以将有问题的控制器添加到login()permission()方法内admin/controller/common/home.php被忽略的数组中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM