datastorm-open / shinymanager

Simple and secure authentification mechanism for single shiny applications.
https://datastorm-open.github.io/shinymanager/
386 stars 79 forks source link

.tok$is_valid_timeout error #61

Closed Rhydderch closed 3 years ago

Rhydderch commented 3 years ago

Hi,

I'm encountering the following errors, once I enter my credentials (the app loads for a second then closes and shows these errors):

Warning in .tok$is_valid_timeout(token, update = FALSE) :
  Incompatible methods ("Ops.difftime", "Ops.data.frame") for "<="
Warning: Error in .tok$is_valid_timeout: 'list' object cannot be coerced to type 'double'
  [No stack trace available]

The code for the server and ui I'm using can be found here (I'm using the golem package to develop the app): https://gist.github.com/Rhydderch/1b3cc0f85d318ebe92f5f7b86f57f882

bthieurmel commented 3 years ago

Hi,

I think there is a mistake in your code :

  res_auth <- secure_server(
    print(credentials),
    check_credentials = check_credentials(credentials)
  )

Due to print(credentials. Just remove this line :

  res_auth <- secure_server(
    check_credentials = check_credentials(credentials)
  )
Rhydderch commented 3 years ago

Thank you so much for checking it. Removing the print() solved it.