| FirebaseSocial | R Documentation |
Use social sites for authentication.
An object of class FirebaseSocial.
firebase::Firebase -> firebase::FirebaseAuth -> FirebaseSocial
firebase::Firebase$expose_app()firebase::FirebaseAuth$clear()firebase::FirebaseAuth$delete_user()firebase::FirebaseAuth$expose_auth()firebase::FirebaseAuth$get_access_token()firebase::FirebaseAuth$get_delete_user()firebase::FirebaseAuth$get_id_token()firebase::FirebaseAuth$get_sign_out()firebase::FirebaseAuth$get_signed_in()firebase::FirebaseAuth$get_signed_up()firebase::FirebaseAuth$is_signed_in()firebase::FirebaseAuth$print()firebase::FirebaseAuth$req_sign_in()firebase::FirebaseAuth$req_sign_out()firebase::FirebaseAuth$request_id_token()firebase::FirebaseAuth$set_language_code()firebase::FirebaseAuth$sign_out()new()FirebaseSocial$new(
persistence = c("session", "local", "memory"),
config_path = "firebase.rds",
language_code = NULL,
session = shiny::getDefaultReactiveDomain()
)persistenceHow the auth should persit: none, the user has to sign in at every visit,
session will only persist in current tab, local persist even when window is closed.
config_pathPath to the configuration file as created by firebase_config.
language_codeSets the language to use for the UI.
Supported languages are listed here.
Set to browser to use the default browser language of the user.
sessionA valid shiny session.
Initialiases Firebase Social
Initialises the Firebase application client-side.
set_scope()FirebaseSocial$set_scope(scope)
scopeGoogle scope.
Define the scope to request from Google.
self
launch_google()FirebaseSocial$launch_google(flow = c("popup", "redirect"))flowAuthentication flow, either popup or redirect.
Launch sign in with Google.
self
launch_github()FirebaseSocial$launch_github(flow = c("popup", "redirect"))flowAuthentication flow, either popup or redirect.
Launch sign in with Github.
self
launch_facebook()FirebaseSocial$launch_facebook(flow = c("popup", "redirect"))flowAuthentication flow, either popup or redirect.
Launch sign in with Facebook.
self
launch_twitter()FirebaseSocial$launch_twitter(flow = c("popup", "redirect"))flowAuthentication flow, either popup or redirect.
Launch sign in with Facebook.
self
clone()The objects of this class are cloneable with this method.
FirebaseSocial$clone(deep = FALSE)
deepWhether to make a deep clone.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.