Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The App keeps asking for permission to "Have offline access", why?

After having authorized the app with oAuth2 and acquiring permissions for requested scopes, I still get a screen asking if I grant the app permission to Have offline access, each time I try to login with Google oAuth2. Isn't it something that shouldn't appear again, once I grant it permission to have it?

enter image description here

like image 597
jayarjo Avatar asked Jan 13 '14 17:01

jayarjo


1 Answers

This prompt could come because of two parameters,

  • access_type (if it is 'offline')
  • approval_prompt (if it is 'force')

make sure you have set access_type to 'online' and apporoval_prompt to 'auto'

 $client->setAccessType('online');  $client->setApprovalPrompt('auto') ; 
like image 170
Deepak Mittal Avatar answered Sep 28 '22 11:09

Deepak Mittal