Closed pedjaman closed 5 years ago
You can call refreshAuthentication class passing $username and $access_token, it shoult renew and return a new token to be stored.
Thank you for your response. Unfortunately, that doesn't help. It is throwing an exception.
Hi there, do you know what exception is being throw when you call refreshAuthentication()
?
Hi :) unfortunately I cannot recall. Not curently actiove on the project. But it does require refresh_token instead of access_token
So the call to authenticate()
returns an AuthenticationResultType
object, you should be able to grab the refresh token from that.
As far as I know from my tests and looking to documentation, there is not refresh_token returned if response_type=token based approach is used. I had to switch using response_type=code based then getting tokens based on code. But if i get a chance, I will try this above.
I was using builtin login page. When using response_type=token i don't get refresh token. When using response_type=code I don't see a way to utilize this class.
So with first approach, after some time, following exception is trigerred (marked with "HERE"):
What would be the best approach to handle this case?
Thank you for this class :)