I’m desperate for finding how to request for new access_token given refresh_token. During sign up process I store access_token and refresh_token.
now, I would like to know how to check if the token has expired. If so, get a new access_token using refresh_token. I couldn’t find any useful information.
I highly suggest you use one of the existing authclient which takes care of all of this rather than reinventing the wheel, yii provides very good auth client to take care of this also you can also use other auth services without changing a lot of code.
line #106 has a method declaration for getAccessToken() method which calls restoreAccessToken() defined on line #260 look at the body of that method, it will check if token is expired if it is it will get a new one