| FirebaseOauthProviders | R Documentation |
Use OAuth provides such as Github or Facebook to allow users to conveniently sign in.
An object of class FirebaseOauthProviders.
firebase::Firebase -> firebase::FirebaseAuth -> FirebaseOauthProviders
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()FirebaseOauthProviders$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 Email Link
Initialises the Firebase application client-side.
set_provider()FirebaseOauthProviders$set_provider(provider, ...)
providerThe provider to user, e.g.: microsoft.com, yahoo.com or google.com.
...Additional options to pass to setCustomParameters.
Define provider to use
self
launch()FirebaseOauthProviders$launch(
flow = c("popup", "redirect"),
get_credentials = FALSE
)flowAuthentication flow, either popup or redirect.
get_credentialsWhether to extract underlying oauth credentials.
Launch sign in with Google.
self
clone()The objects of this class are cloneable with this method.
FirebaseOauthProviders$clone(deep = FALSE)
deepWhether to make a deep clone.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.