So, I know that access token is being received always when the user logs in and is valid for 1 hour. And the refresh token is also received, but only when user is prompt to agree with rights. This refresh token can be used offline.
Do I have to refresh the access token? What is the point of access token, if all I need is that refresh token? I'm so confused.
Especially what's the point of this code?
$refresh = $this->getRefreshToken();
if ($refresh) {
$res = $this->fetchAccessTokenWithRefreshToken($refresh);