How can I persist login information? #3079
-
Hi! My usecase is running ondrive as a container on a true-nas system, which hosts a samba share. Part of that samba should be a directory that mirrors the entire contents of my personal onedrive. I got onedrive working by pasting the response url in the container in interactive mode, however: It seems to me like I will need to do this manually, everytime the container restarts. I will shut down the truenas system once in a while, and having to remember to log in to onedrive again every time seems bad. Is there a way to persist the login information? I tried using ONEDRIVE_AUTHRESPONSE, but the response url from the last container start was already invalidated, so it doesn't seem reliable for long-term use. ONEDRIVE_AUTHFILES also seems to require new login every time. Is there some way to generate an API-token once, and use that for authentication until it expires in something like a year, instead of having to re-login every time the container restarts? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The authentication information persists by default so that once authenticated, it is persisted until you either change your password, or the key expires through zero renewal. When running as a Container the authentication information is stored in the required config volume. Please read https://github.com/abraunegg/onedrive/blob/master/docs/docker.md#5-configure-the-required-docker-volumes as to the volumes required. Please review how you have implemented the container as this is 100% something you are doing to cause this outcome. |
Beta Was this translation helpful? Give feedback.
@simonvanbernem
The authentication information persists by default so that once authenticated, it is persisted until you either change your password, or the key expires through zero renewal.
When running as a Container the authentication information is stored in the required config volume. Please read https://github.com/abraunegg/onedrive/blob/master/docs/docker.md#5-configure-the-required-docker-volumes as to the volumes required.
Please review how you have implemented the container as this is 100% something you are doing to cause this outcome.