Skip to content

fix: adapt new version of homeassistant with jwt version 2.x.x#47

Open
moonsn wants to merge 3 commits into
cnk700i:masterfrom
moonsn:master
Open

fix: adapt new version of homeassistant with jwt version 2.x.x#47
moonsn wants to merge 3 commits into
cnk700i:masterfrom
moonsn:master

Conversation

@moonsn

@moonsn moonsn commented Oct 23, 2021

Copy link
Copy Markdown

homeassistant updated jwt module to version 2 (#55911) , this jwt version
deprecated jwt.decode verify_expiration and require explicit
algorithms parameter (changelog). the deprecated may cause HAVCS update access_token's expiration
failed.

this pr fix this problem and make it works on jwt version 1 and version 2 both by check the jwt version and choice appropriate decode method.

homeassistant update jwt module to version 2 recently [#55911](home-assistant/core#55911), this jwt version
deprecated jwt.decode verify_expiration and require explicit
algorithms parameter [changelog](https://pyjwt.readthedocs.io/en/stable/changelog.html?highlight=verify#require-explicit-algorithms-in-jwt-decode-by-default). so, cause HAVCS update access_token's expiration
failed.
@dscao

dscao commented Mar 5, 2022

Copy link
Copy Markdown

Thank you, After replacing the file “util.py”, it was finally normal for ha2022.3。

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