# NOT RUN {
library(shiny)
library(firebase)
ui <- fluidPage(
useFirebase(),
actionButton("signin", "Sign in with Microsoft", icon = icon("microsoft")),
plotOutput("plot")
)
server <- function(input, output, session){
f <- FirebaseOauthProviders$
new()$
set_provider("microsoft.com")
observeEvent(input$signin, {
f$launch()
})
output$plot <- renderPlot({
f$req_sign_in()
plot(cars)
})
}
# }
# NOT RUN {
shinyApp(ui, server)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab