mirror of
https://github.com/ciur/papermerge.git
synced 2026-04-25 03:55:58 +03:00
[GH-ISSUE #593] Generated api token not valid after some hours #463
Labels
No labels
2.1
3.0
3.0.1
3.0.2
3.0.3
3.0.3
3.1
3.2
3.2
3.3
3.5
3.x
Fixed. Waiting for feedback.
Fixed. Waiting for feedback.
UX
Version 2.1 - alpha
XSS
announcement
beta
blocker
bug
cannot reproduce
confirmed
confirmed
critical
demo
dependencies
deployment
detchnical debt
discussion
docker
documentation
donations
duplicate
enhancement
feature request
frontend
fundraising
good first issue
good issue
help wanted
high
implemented
important
improvement
incomplete
invalid
investigation
kubernetes
low
low impact
medium
medium
medium impact
migration from 2.0
migration from 2.1
missing-language
missing-ocr-language
no-activity
note
ocr
outofscope
packaging
performance
popular request
pull-request
pypi
question
raspberry pi
roadmap
search
security
setup
status
task
technical debt
updates
user xp
version 1.4.0 - demo
will be implemented
will not be implemented
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/papermerge#463
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @smart-clouds-09 on GitHub (Feb 4, 2024).
Original GitHub issue: https://github.com/ciur/papermerge/issues/593
Originally assigned to: @ciur on GitHub.
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:GenericModelhas 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:
@ciur commented on GitHub (Feb 9, 2024):
Default expiration time for the token is 360 minutes (i.e. 6 hours). If you want to change that use
PAPERMERGE__SECURITY__TOKEN_EXPIRE_MINUTESsettings. I forgot to add that to docs. I will mark this ticket as documentation issue and update documentation accordingly.@smart-clouds-09 commented on GitHub (Feb 10, 2024):
thanks, is there a value for unexpired ?
@ciur commented on GitHub (Feb 10, 2024):
I've updated documentation.
No. Just set it to big enough value. E.g. 525600 (60x24x365) is the number of minutes in a year.
@smart-clouds-09 commented on GitHub (Feb 10, 2024):
meanwhile I have written a script, which updates the token after a few minutes. Thank for updating the docs
@WolfgangFahl commented on GitHub (Aug 24, 2024):
Please reopen the issue and change the default to at least 1 year.
https://docs.papermerge.io/3.0/rest-api/token/ is also hard to find - this should be part of describing the API
@WolfgangFahl commented on GitHub (Aug 25, 2024):
thx i am using
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