FirebaseSocial: Social

Description Super class Methods Examples

Description

Use social sites for authentication.

Super class

firebase::Firebase -> FirebaseSocial

Methods

Public methods

Inherited methods

Method set_scope()

Usage
FirebaseSocial$set_scope(scope)
Arguments
scope

Google scope.

Details

Define the scope to request from Google.

Returns

self


Method launch_google()

Usage
FirebaseSocial$launch_google(flow = c("popup", "redirect"))
Arguments
flow

Authentication flow, either popup or redirect.

Details

Launch sign in with Google.

Returns

self


Method launch_github()

Usage
FirebaseSocial$launch_github(flow = c("popup", "redirect"))
Arguments
flow

Authentication flow, either popup or redirect.

Details

Launch sign in with Github.

Returns

self


Method launch_facebook()

Usage
FirebaseSocial$launch_facebook(flow = c("popup", "redirect"))
Arguments
flow

Authentication flow, either popup or redirect.

Details

Launch sign in with Facebook.

Returns

self


Method launch_twitter()

Usage
FirebaseSocial$launch_twitter(flow = c("popup", "redirect"))
Arguments
flow

Authentication flow, either popup or redirect.

Details

Launch sign in with Facebook.

Returns

self


Method clone()

The objects of this class are cloneable with this method.

Usage
FirebaseSocial$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
27
28
29
30
library(shiny)
library(firebase)

# define signin
signin <- modalDialog(
  title = "Login",
  actionButton("google", "Google", icon = icon("google"), class = "btn-danger"),
  actionButton("github", "Github", icon = icon("github")),
  footer = NULL
)

ui <- fluidPage(
  useFirebase()
)

server <- function(input, output) {
  showModal(signin)

  f <- FirebaseSocial$new()

  observeEvent(input$google, {
    f$launch_google()
  })

  observeEvent(input$github, {
    f$launch_github()
  })
}

## Not run: shinyApp(ui, server)

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