bauerj / paperless_app

An Android/iOS app for Paperless
https://play.google.com/store/apps/details?id=eu.bauerj.paperless_app
GNU General Public License v3.0
525 stars 46 forks source link

Token authentication #81

Open dorianim opened 2 years ago

dorianim commented 2 years ago

Is your feature request related to a problem? Please describe. I am using the PAPERLESS_ENABLE_HTTP_REMOTE_USER authentication. Therefore, I cannot log in with username and password.

Describe the solution you'd like It would be nice, to be able to use a token for authentication in this case.

Describe alternatives you've considered

Additional context As far as I can tell, Django token authentication is already enabled in Paperless-ng. Tokens can be created in the Admin settings. The corresponding docs are here: https://paperless-ngx.readthedocs.io/en/latest/api.html?highlight=token#authorization

pree commented 2 years ago

I'm doing something similar, with an oauth2-proxy in front of paperless-ngx. To get the app running I've exposed /api without the proxy, which made it possible to login.

PDF's are however not downloaded, as the paperless app still uses the old /fetch/doc/xx endpoint instead of the newer /api/document/<pk>/download Ref

bauerj commented 2 years ago

Yes, token authentication should be implemented although I planned on requesting a token though the app after a basic-Auth login. I assume that wouldn't help in your case though.

@pree Thanks for pointing that out. This should be changed in the next release. Could you please open a separate issue to change the URL?

pree commented 2 years ago

@pree Thanks for pointing that out. This should be changed in the next release. Could you please open a separate issue to change the URL?

Done #82 :)

dkowis commented 1 year ago

I have just set up paperless-ngx behind an oauth2 proxy as well, and sadly I can't authenticate using the token.

There is a pull request in progress to add oidc auth to it, so it'd be super handy to havea way to put in a token.