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

How long should the auth token last? #30

Open
michaelroper opened this issue Apr 29, 2022 · 2 comments
Open

How long should the auth token last? #30

michaelroper opened this issue Apr 29, 2022 · 2 comments

Comments

@michaelroper
Copy link

Hi Elio! Just wondering how long the auth token should last, or in what circumstances it would have to re-authenticate? It seems to be doing it every couple of days for me, and (from what I can tell) its not because I'm restarting Homebridge or anything like that.

Anyway - I love the plugin, its been a great help in stopping my family from bursting into my office when I'm on a call! 🚨

@estruyf
Copy link
Owner

estruyf commented Apr 29, 2022

The plugin stores the refresh token and will fetch an access token when performing a call. As normally, the access token has a lifetime of 60min.

Refresh token has a longer lifetime. As the service will keep itself alive by requesting a new access token and updating the previous refresh token, it should never end up in a state where the refresh token has expired. Or someone revoked access.

Just in case to see what is happening, you can turn on the debug mode, and hopefully, it will show what is happening with requesting a new access token. You can do this by adding "debug": true to your config for the presence-switch accessory.

@michaelroper
Copy link
Author

Ah, I see - I'll try the debug switch and see if I can get a better idea of what's going!

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