Reputation: 3462
I'm looking for a user registration/log in code template for r/shiny. It need not be secure, just a way to personalize the content on a shiny app based on previous user settings. I don't want to rely too much on server services (such as accessing cookies)
I wonder if there is something out there, or whether there are any suggestions about how to implement it.
So far I've been trying to do it myself, using a set of reactive variables (other than the input/output) on the client side, that remember the state of the session. The code became a bit ugly and I wonder if there is something simpler that I can reuse.
A link to a working example would be great as well :)
Thanks.
Upvotes: 5
Views: 4434
Reputation: 78
I know that this question is pretty old, but I want to add answer for anyone else looking for solution nowadays.
Facing the problem like yours I'm developing a package shiny.reglog
. It allows anonymous users to look through your app, but also allows user to register. Server-side can access the user id of the logged user for inter-session recognition.
Package is available through CRAN, for development version and more in-depth guide and examples check github: https://github.com/statismike/shiny.reglog
Upvotes: 4
Reputation: 881
http://shiny.rstudio.com/gallery/authentication-and-database.html - Here the membership information is saved into membership_db through savesqlite. I think you can allow registration by adding to membship_db
Upvotes: 1