auth0_logout_url: Generate logout URL

Description Usage Arguments Examples

View source: R/shiny.R

Description

auth0_logout_url() is defunct as of auth0 0.1.2 in order to simplifly the user experience with the logoutButton() function.

Usage

1
auth0_logout_url(config_file = NULL, redirect_js = TRUE)

Arguments

config_file

Path to YAML configuration file.

redirect_js

include javascript code to redirect page? Defaults to TRUE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# simple UI with action button
# AFTER auth0 0.1.2

library(shiny)
library(auth0)

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

# simple UI with action button
# BEFORE auth0 0.1.2

library(shiny)
library(auth0)
library(shinyjs)

# note that you must include shinyjs::useShinyjs() for this to work
ui <- fluidPage(shinyjs::useShinyjs(), actionButton("logout_auth0", "Logout"))

# server with one observer that logouts
server <- function(input, output, session) {
  observeEvent(input$logout_auth0, {
    # javascript code redirecting to correct url
    js <- auth0_logout_url()
    shinyjs::runjs(js)
  })
}

shinyAuth0App(ui, server, config_file = config_file)

juan-12286/Autenticaci-n-con-Auth0 documentation built on Jan. 1, 2021, 7:11 a.m.