Read more
Google Oauth 2.0 ask permission every time
2013-10-21
PHP
,PHPWeb Service
I have made a application using google account for login. Reference to google's example, it's easy make the login work well. However, I'm face to a serious problem that google ask for permission approval every time. For a openid login, like facebook, we will ask permission in the first time only and for the next time, it should automatically complete the login and no need to approve by user again. For this purpose, I search from the internet and finally found the solution as following:
To make the application just ask permission for once, add the following line in the config
$client->setApprovalPrompt(auto);
...........