PaulC91 / shinyauthr

R package with shiny authentication modules
https://paulc91.github.io/shinyauthr/
Other
427 stars 81 forks source link

login error after shiny timeout #61

Open vdebuen opened 2 years ago

vdebuen commented 2 years ago

Hello.

First of all I would like to thank you for this great clearance package.

In general it works quite well for both login and logout but sometimes I encounter problems when the shiny session gives timeout after a long time.

When you refresh the page with F5 it freezes and on the terminal where the application is running I get these messages.

Warning: Error in UseMethod: no applicable method for 'tbl_vars' applied to an object of class "list"
  69: tbl_vars_dispatch
  66: tbl_vars
  64: tbl_nongroup_vars
  63: tbl_if_vars
  59: tbl_if_syms
  58: manip_if
  57: dplyr::mutate_if
  56: shinyauthr::loginServer
  51: server
   5: shiny::runApp
   4: eval
   3: eval
   1: source
Error in UseMethod("tbl_vars") :
  no applicable method for 'tbl_vars' applied to an object of class "list"

I realise that it is not at all easy to reproduce this error, but perhaps with this information you can guess what might be happening and how to avoid it.

This is the information of the package I have installed, as shown in the R statement sessionInfo()$otherPkgs$shinyauthr

Package: shinyauthr
Type: Package
Title: 'Shiny' Authentication Modules
Version: 1.0.0
Authors@R: c(person(given = "Paul", family = "Campbell", email = "pacampbell91@gmail.com", role = c("aut", "cre"), comment =
              c(ORCID = "0000-0003-1018-6606")), person(given = "Michael", family = "Dewar", email = "michael.p.dewar@gmail.com",
              role = "ctb"))
Description: Add in-app user authentication to 'shiny', allowing you to secure publicly hosted apps and build dynamic user
              interfaces from user information.
License: MIT + file LICENSE
Encoding: UTF-8
Imports: shiny (>= 1.5.0), shinyjs, dplyr, rlang, sodium, glue
Suggests: DBI, RSQLite, lubridate, shinydashboard, testthat (>= 3.0.0), shinytest, knitr, rmarkdown, covr
RoxygenNote: 7.1.1
URL: https://github.com/paulc91/shinyauthr
BugReports: https://github.com/paulc91/shinyauthr/issues
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2021-07-19 10:41:29 UTC; paul
Author: Paul Campbell [aut, cre] (<https://orcid.org/0000-0003-1018-6606>), Michael Dewar [ctb]
Maintainer: Paul Campbell <pacampbell91@gmail.com>
Repository: CRAN
Date/Publication: 2021-07-20 07:20:02 UTC
Built: R 4.1.2; ; 2022-06-12 10:08:22 UTC; unix

Thank you very much in advance

vdebuen commented 2 years ago

It would also be a good idea, for security reasons, for the system itself to logout when shiny goes into timeout and then require login again when the user returns.

sanjmeh commented 12 months ago

+1 did you find a solution? it seems this package is not maintained now.

PaulC91 commented 12 months ago

@vdebuen @sanjmeh can you explain what you mean exactly by a shiny 'timeout' ? shinyauthr returns to a logged out state when a session is restarted (a page refresh for example). I'd need more information about what is happening during your app's 'timeout' to try to reproduce this.

sanjmeh commented 12 months ago

I am sorry, it was while using shinymanager ( and I thought I was using shinyauthr). It seems shinymanager has this bug.

If shinyauthr is better shall I give it a try?