Stirling-Tools / Stirling-PDF

#1 Locally hosted web application that allows you to perform various operations on PDF files
GNU General Public License v3.0
29.63k stars 2.17k forks source link

v0.22.3 API key disappeared (DigitalOcean App) #959

Open geoffatsource opened 3 months ago

geoffatsource commented 3 months ago

Not sure if it was a pod restart or something, but API auth stopped working and the API key suddenly disappeared from the UI. Is there a way to put this value into app environment variables instead of generating it in the UI?

Frooodle commented 3 months ago

" and the API key suddenly disappeared from the UI." Can you expand further on this? Do you mean you dont see a "your api key" section at the /account page?

geoffatsource commented 3 months ago

My API key was set a while ago, but suddenly it was no longer being accepted by the API. So, I went into the UI and there was no ••••••••• where the API key should be. The field was empty.

May be hard to repro:

  1. Generate an API key in the UI
  2. Use the API and verify auth works
  3. Do mystery thing... restart pod or service? 🤷
  4. Use the API and verify the API key no longer works

Sorry to be so vague! 🙇

Frooodle commented 3 months ago

Ahhh understood

So can the issue be resolved by hitting refresh button in the API box and generating a new API key?

Also the API key is stored in the user info which is in the config/dB.mv.db file

So if something happened to that would cause this

geoffatsource commented 3 months ago

I was able to replicate this by trying to merge 120 PDF documents and overloading the pod, causing a 504 error. It restarted and lost the API key

geoffatsource commented 3 months ago

Generating a new API "resolves" the issue but then I need to update all the services that used the old key

geoffatsource commented 1 week ago

Was this ever resolved?