preserving work with shiny-server-pro google authentification

I have a shiny-server-pro to host learnr tutorials (Rmd files). I'm using Google Authentication for user to log into shiny server. I would like to have each user's work on their tutorials preserved on the shiny-server. So when users log in from a different computer, they can go back to where they left off.

How can I do that?

Thanks!

I asked around a bit, Robby suggests

The default behavior is to save the state in local storage on the user’s browser - which means if they later access the tutorial from a different machine / browser, the state won’t be known. This is covered here: https://rstudio.github.io/learnr/#preserving_work I believe there are hooks that would allow you to save per user state on a server, and I believe those hooks are covered here (https://rstudio.github.io/learnr/publishing.html)

Thanks Curtis.

Yes, I'm aware of those documentation. But I am not able to figure out how to implement those hooks.

Currently, what I'm able to do is to use PAM authentication to get logged in user's work preserved (stored) in the server, so that when the user logs in again next time from a different computer, the tutorial goes to where the user is left off.

But, to use PAM authentication, I need to create users manually in the server. I would like to use google authentication to achieve the same behavior. Is that possible?

Sorry for the late reply, but for tutorial.http_header_user_id option, you could try "Shiny-Server-Credentials", which will be a JSON string that includes the user's gmail address.

Thanks Joe.

Are you suggesting setting this option in Rmd such as below?

options(

tutorial.storage = filesystem_storage("/srv/shiny-server/tut_stor", compress = TRUE),

tutorial.http_header_user_id = "Shiny-Server-Credentials"

)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.