Use firebase to manage authentications.
firebase::Firebase
-> firebase::FirebaseAuth
-> FirebaseUI
tos_url
URL to the Terms of Service page.
privacy_policy_url
The URL to the Privacy Policy page.
Inherited methods
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()
FirebaseUI$new(
persistence = c("session", "local", "memory"),
config_path = "firebase.rds",
language_code = NULL,
session = shiny::getDefaultReactiveDomain()
)
persistence
How 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_path
Path to the configuration file as created by firebase_config
.
language_code
Sets the language to use for the UI.
Supported languages are listed here.
Set to browser
to use the default browser language of the user.
session
A valid shiny session.
set_providers()
FirebaseUI$set_providers(
google = FALSE,
facebook = FALSE,
twitter = FALSE,
github = FALSE,
email = FALSE,
email_link = FALSE,
microsoft = FALSE,
apple = FALSE,
yahoo = FALSE,
phone = FALSE,
anonymous = FALSE
)
launch()
FirebaseUI$launch(flow = c("popup", "redirect"), account_helper = FALSE)
flow
The signin flow to use, popup or redirect.
account_helper
Wether to use accountchooser.com upon signing in or signing up with email, the user will be redirected to the accountchooser.com website and will be able to select one of their saved accounts. You can disable it by specifying the value below.
...
Any other option to pass to Firebase UI.
re_authenticate()
Re-authenticate the user.
Some security-sensitive actions—such as deleting an account, setting a primary email address, and changing a password—require that the user has recently signed in. If you perform one of these actions, and the user signed in too long ago, the action fails with an error.
library(shiny)
library(firebase)
ui <- fluidPage(
useFirebase(), # import dependencies
firebaseUIContainer() # import UI
)
server <- function(input, output){
f <- FirebaseUI$
new()$ # instantiate
set_providers( # define providers
email = TRUE,
google = TRUE
)
}
if (FALSE) shinyApp(ui, server)