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

What is the expiry time on the access token - it isn't 2 days like the documentation says #175

Open
dwaynez opened this issue Apr 5, 2024 · 1 comment

Comments

@dwaynez
Copy link

dwaynez commented Apr 5, 2024

I get a token and then I use it every now and again. When I go to use it 26 hours after the email login, it fails on 'token expired'. Anyone have better experience with the life span of the access token? Also the documentation says that the refresh token has a lifespan of 30 days. Anyone have verification of this? This is the documentation that I am referring to: https://support.wyze.com/hc/en-us/articles/16129834216731-Creating-an-API-Key

@bmatticus
Copy link

If you take the jwts and decode them, it looks like the access token is just under 2 hours currently and the refresh is 28 days:

print(b64decode(f"{at.split('.')[1]}=="))
b'{"aud":["oauth2-resource","native_oauth2_resource"],"user_id":"*","user_name":"","scope":["native"],"iss":"https://auth.wyze.com","created_at":1720391946,"exp":1720397946,"authorities":["USER"],"jti":******","client_id":"******"}'
1720397946-1720391946
6000
(1720397946-1720391946) / 3600
1.6666666666666667

print(b64decode(f"{rt.split('.')[1]}")) b'{"aud":["oauth2-resource","native_oauth2_resource"],"user_id":"","user_name":"","scope":["native"],"ati":"******","iss":"https://auth.wyze.com","created_at":1720906453,"exp":1723325653,"authorities":["USER"],"jti":"******","client_id":"******"}'
1723325653-1720906453
2419200
(1723325653-1720906453) / 86400
28.0

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

No branches or pull requests

2 participants