Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add login token lifetime to consts and use it in all API clients #467

Merged
merged 1 commit into from
Dec 28, 2023

Conversation

freaksdotcom
Copy link
Contributor

@freaksdotcom freaksdotcom commented Dec 26, 2023

fix: Add the token lifetime to const.py and use the value across all API endpoints.

@freaksdotcom freaksdotcom changed the title Add login token lifetime to consts and use it in all API clients [fix] Add login token lifetime to consts and use it in all API clients Dec 26, 2023
@freaksdotcom freaksdotcom changed the title [fix] Add login token lifetime to consts and use it in all API clients fix: Add login token lifetime to consts and use it in all API clients Dec 26, 2023
@cdnninja
Copy link
Collaborator

I don't think the USA token is valid for 24 hours. Have you tested to see if they are now valid for that long? Historically they were much shorter than other regions.

@freaksdotcom
Copy link
Contributor Author

I don't think the USA token is valid for 24 hours. Have you tested to see if they are now valid for that long? Historically they were much shorter than other regions.

Can you point out where this was discussed? I'd like to know how the lifetime was determined.

I've been running it on my local instance for a few hours and the integration has not encountered any problems with fetching data, but it's been less than the full 23 hours.

During the time that it's been running, the car has not been exhibiting the periodic wake ups that I'm trying to fix.

@cdnninja
Copy link
Collaborator

Looking back at some of the code I think a short token was used to cover when the token was invalidated. Back when this was written if you used the mobile app it would invalidate the token. The code now can recover from this. USA Kia code is largely unmaintained as we don't have very many active USA devs here. Have had some recent interest though!

Since you tested out I am happy to merge this. Worst case we revert!

@cdnninja cdnninja merged commit 10d38b3 into Hyundai-Kia-Connect:master Dec 28, 2023
15 of 18 checks passed
@freaksdotcom freaksdotcom deleted the token_lifetime branch December 28, 2023 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants