readium-js-viewer icon indicating copy to clipboard operation
readium-js-viewer copied to clipboard

Implement Authintication and disable individual upload

Open nasirkhan opened this issue 6 years ago • 4 comments

I followed the steps mentioned in the Readme file and successfully installed the cloud reader. Now i need to have some specific features which are not mentioned in the doc. In summary i want to build a library with a number of books and any one can register and read the books free of cost here. But without registration the books will not be accessible.

  1. I need to apply authentication because i want to open the library for the registered users only. Anyone having the link can not read the book unless s/he creates an account. How can i enable this feature in the cloud reader?

  2. I also want to disable the book upload option for the reader users. but admin users can upload books.

nasirkhan avatar Feb 08 '18 09:02 nasirkhan

The Readium cloud / web reader is a client-side app that runs entirely in the browser. There is no server-side code at all. EPUB files are stored on the server side (static hosting), and they are simply referenced via URLs by the client code.

You can of course implement your own "backend" to host the publications and expose their resources via a system of HTTP API / routes, authentication middleware, etc. Perhaps you should consider using the "lite" version of the cloud reader which does not include the library view (only the reader view). This way, you could focus on implementing a proper content server / backend, and content manager / UI frontend (for example, an OPDS feed explorer), and use the Readium cloud reader just for the "book reading" part.

danielweck avatar Feb 09 '18 14:02 danielweck

@danielweck Thanks for your response.

Do you have any example project where the backend is implemented separately? It would be a great to learn from other projects.

nasirkhan avatar Feb 12 '18 16:02 nasirkhan

No I do not, sorry.

danielweck avatar Feb 12 '18 18:02 danielweck

@danielweck can you close this? It is polluting the issue list. It is resolved / inactive.

coler-j avatar Sep 27 '18 18:09 coler-j