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 bug in refresh_access_token #206

Merged
merged 1 commit into from
Aug 9, 2021
Merged

Conversation

BreakingBread0
Copy link
Contributor

Throws an exception when calling refresh_access_token that the URL parameter is nether a string nor a httpx.Url

Throws an exception when calling refresh_access_token that the URL parameter is nether a string nor a httpx.Url
@alandtse
Copy link
Collaborator

alandtse commented Aug 9, 2021

Is this the only fix you need in teslajsonpy or are you expecting more?

@alandtse alandtse merged commit ba19cc1 into zabuldon:dev Aug 9, 2021
@alandtse
Copy link
Collaborator

alandtse commented Aug 9, 2021

I pushed to dev but will wait to pushing for publication for now. If you need multiple changes I'll wait till the set is there.

@BreakingBread0
Copy link
Contributor Author

BreakingBread0 commented Aug 9, 2021

I pushed to dev but will wait to pushing for publication for now. If you need multiple changes I'll wait till the set is there.

Oh, thank you. I actually have a few more issues with the library i just came accross:

elif self.sso_oauth.get("refresh_token") and now > self.sso_oauth.get(

Is this check for refresh_token AND checking for expiry intentional? Shouldn't only the access_tokens (for ownerapi and sso) expire?

@alandtse
Copy link
Collaborator

alandtse commented Aug 9, 2021

Yes only access tokens expire but if you do not have a refresh token, you can't get an access token. So it's confirming there is a valid refresh token before trying to refresh.

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.

2 participants