logoutButton: Create a button to log out

View source: R/logout.R

logoutButtonR Documentation

Create a button to log out

Description

A logoutButton is an actionButton that is meant to be used to log out of an auth0 Shiny app.

Usage

logoutButton(label = "Log out", ..., id = "._auth0logout_")

Arguments

label

The label on the button.

...

Named attributes to apply to the button.

id

An ID for the button. If you only have one logout button in your app, you do not need to explicitly provide an ID. If you have more than one logout button, you need to provide a unique ID to each button. When you create a button with a non-default ID, you must create an observer that listens to a click on this button and logs out of the app with a call to logout.

See Also

logout, logout_url

Examples

if (interactive()) {
  ui <- fluidPage(
    logoutButton(),
    logoutButton(label = "Another logout button", id = "logout2")
  )
  server <- function(input, output, session) {
    observeEvent(input$logout2, {
      logout()
    })
  }
  shinyAuth0App(ui, server)
}


auth0 documentation built on March 31, 2023, 9:47 p.m.