Self-updating access token from refresh token
Celeo opened this issue · comments
If the struct instance has a refresh token specified, it'd be convenient if it used that token automatically when the access token expired to fetch another.
what I am doing wrong in this? I'm doing an successful authentication, when the grace period it is reached, functions that retrieve authenticated data throws this error:
Access token is expired, and no refresh token is present
and I was using refresh_access_token(Some(refresh_token))
to refresh tokens, the refresh operation completes successfully but the .group_location().get_location(Player_id)
still returns the same error.
The esi object it has token information populated. am I doing anything wrong ?
Unfortunately that error is a bit misleading - the access token has expired, but that's it currently. There's no mechanism, despite what the error says, for automatically generating a new access token from a refresh token. You'll have to do that yourself with esi.refresh_access_token
. If that function is not updated the stored access token, then that'd be a bug.
Its not a bug it was something on my end, Thank you
Okay!