Lets say i have following code
$state = 1234;
$client = new \Google_Client();
$client->setClientId('######');
$client->stClientSecreet('####3');
$client->addScope('https://www.googleapis.com/auth/youtube');
$client->setState($state);
$client->setAccessType("offline"); // offline access
$client->setRedirectUri($redirect_uri);
$client->refreshToken($decoded_refresh);
$auth_url = $client->createAuthUrl();
$client->setApprovalPrompt("auto");
header('Location: '. filter_var($auth_url, FILTER_SANITIZE_URL));
i have refresh token
with offline access,when it calls
header('Location: '. filter_var($auth_url, FILTER_SANITIZE_URL));
but it again and again show consent screen
to ask user permission, what mistake i made here?