kashalls / external-dns-unifi-webhook

External-DNS Webhook to manage UniFi DNS Records
Apache License 2.0
108 stars 7 forks source link

fix: add rememberMe to login #22

Closed onedr0p closed 4 months ago

kashalls commented 4 months ago

This just extends the lifetime of the cookie from 2 hours to 30 days. While 30 days might be a stretch for the lifetime of this container as external-dns probably would update and cause this to refresh, there is a /api/auth/refresh that takes the UOS_TOKEN, maybe if we got a better api capture of that in action we could replicate it.

onedr0p commented 4 months ago

If we still want longer lived cookies, this can be added after https://github.com/kashalls/external-dns-unifi-webhook/pull/23 is merged and tested.

Overall it's probably not need, up for debate.

onedr0p commented 4 months ago

I don't see anything on the docs about that /api/auth/refresh ep, so if you want to go down the rabbit hole feel free

https://ubntwiki.com/products/software/unifi-controller/api

kashalls commented 4 months ago

If you look into the local console network it calls refreshSesssion if the token is expired for a short time after it was expired. Doesn't seem to take any additional arguments.

8PsctnY