FirebaseOauthProviders: OAuth Providers

Description Super class Methods Examples

Description

Use OAuth provides such as Github or Facebook to allow users to conveniently sign in.

Super class

firebase::Firebase -> FirebaseOauthProviders

Methods

Public methods

Inherited methods

Method set_provider()

Usage
FirebaseOauthProviders$set_provider(provider)
Arguments
provider

The provider to user, e.g.: microsoft.com, yahoo.com or google.com.

Details

Define provider to use

Returns

self


Method launch()

Usage
FirebaseOauthProviders$launch(flow = c("popup", "redirect"))
Arguments
flow

Authentication flow, either popup or redirect.

Details

Launch sign in with Google.

Returns

self


Method clone()

The objects of this class are cloneable with this method.

Usage
FirebaseOauthProviders$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

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
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)

firebase documentation built on March 31, 2020, 5:17 p.m.