I found an answer to this question in another thread.
Change:
'access_lifetime' => $o['access_token_lifetime'] == '' ? 3600 : $o['access_token_lifetime'],
To:
'access_lifetime' => 99999999,
But i’m still curious if there is no better solution to avoid expiration without changing the plugin code.
-
This reply was modified 8 years, 8 months ago by
kiLaa.
Hi
Sorry for the frustration. As mentioned above, you can change the plugin configuration array but it will be wiped on an update and things will break. Also, I would like to note that a longer lifetime on an access token can lead to exploits and exposure to unauthorized requests. It is not recommended to set the lifetime to something really long.
The functionality you are really looking for is what is known as a “refresh token”. This is used to request a new access token after it has expired without having to run the authorization process again. This is typically done in the back-end and the user never sees the interaction. Unfortunately, this functionality is not in this version (free version) of the plugin.
Please let me know if you have any other questions.
-
This reply was modified 8 years, 8 months ago by
Justin Greer.
Hey there
Well it’s not an issue for me to buy your plugin. It’s just very unclear what features are available in the Free Version and what not.
So is there a out-of-the-box solution for the refreshing tokens in the Pro-Version? I don’t need to handle anything in my client side JS?
Hi,
I am sorry about the clarity of the plugin. I will be working on this in the coming months. I am not able to really comment on PRO sales here but if you head over to https://wp-oauth.com and request a chat, we can talk there.
Please let me know if you have any other questions. We can talk directly through support given the link above!