curso-r / auth0

Authentication in shinyapps using Auth0 service
https://curso-r.github.io/auth0/
Other
154 stars 21 forks source link

Logout button is closing session and not redirecting to login page #73

Open jtrecenti opened 4 years ago

jtrecenti commented 4 years ago

It's not a bug.

When using shinyapps.io, we must tell that {shinyjs} package is required in order to make the logoutButton() work. As it is only a Suggestion, the app halts.

Example.

Works:

library(shinyjs)
ui <- shiny::fluidPage(auth0::logoutButton())
server <- function(input, output, session) { }
auth0::shinyAppAuth0(ui, server)

Does not work (when clicking logout)

ui <- shiny::fluidPage(auth0::logoutButton())
server <- function(input, output, session) { }
auth0::shinyAppAuth0(ui, server)

Maybe we should reconsider past decisions and put {shinyjs} to Imports again?

JulianoAtto commented 1 year ago

Hi,

I'm using {shinyjs} in Imports and my auth0::logoutButton() is causing "Disconnected from Server".

I'm using {golem} and added the dependency with the function usethis::use_package("shinyjs").

I'm also using shinyjs::useShinyjs() in the app_ui.R.

Is there any workaround?