-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
Generated api token not valid after some hours #593
Comments
Default expiration time for the token is 360 minutes (i.e. 6 hours). If you want to change that use |
thanks, is there a value for unexpired ? |
I've updated documentation.
No. Just set it to big enough value. E.g. 525600 (60x24x365) is the number of minutes in a year. |
meanwhile I have written a script, which updates the token after a few minutes. Thank for updating the docs |
Please reopen the issue and change the default to at least 1 year. |
thx i am using # Token expiration time in minutes. Here, it's set to 2 years (1051200 minutes).
# Adjust as necessary for your security requirements.
PAPERMERGE__SECURITY__TOKEN_EXPIRE_MINUTES=1051200 as a workaround in the papermerge script at https://github.com/WolfgangFahl/scan2wiki/blob/main/scripts/papermerge see also https://wiki.bitplan.com/index.php/Papermerge#Exploring_the_environment_variables |
The tokens, which are generated with create_token.sh are not valid anymore after a time, in my case some hours.
I have been using the token for papermerge-cli to import docs. After a time papermerge-cli throws :
/usr/local/lib/python3.10/site-packages/pydantic/_migration.py:283: UserWarning:
pydantic.generics:GenericModel
has been moved topydantic.BaseModel
.warnings.warn(f'
{import_path}
has been moved to{new_location}
.')Unauthorized
Is a new token generated, it works for a while
Info:
The text was updated successfully, but these errors were encountered: