Learn R Programming

firebase (version 0.1.0)

FirebaseUI: Prebuilt UI

Description

Use fireblaze to manage authentications.

Arguments

Super class

firebase::Firebase -> FirebaseUI

Public fields

tos_url

URL to the Terms of Service page.

privacy_policy_url

The URL to the Privacy Policy page.

Methods

Public methods

Method set_providers()

Usage

FirebaseUI$set_providers(
  google = FALSE,
  facebook = FALSE,
  twitter = FALSE,
  github = FALSE,
  email = FALSE,
  microsoft = FALSE,
  apple = FALSE,
  yahoo = FALSE,
  phone = FALSE,
  anonymous = FALSE
)

Arguments

google, facebook, twitter, github, email, microsoft, apple, yahoo, phone, anonymous

Set to TRUE the providers you want to use, at least one.

Details

Define signin and login providers.

Returns

self

Method set_tos_url()

Usage

FirebaseUI$set_tos_url(url)

Arguments

url

URL to use.

Details

Defines Tterms of Services URL

Returns

self

Method set_privacy_policy_url()

Usage

FirebaseUI$set_privacy_policy_url(url)

Arguments

url

URL to use.

Details

Defines Privacy Policy URL

Returns

self

Method launch()

Usage

FirebaseUI$launch(flow = c("popup", "redirect"), account_helper = FALSE)

Arguments

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.

Details

Setup the signin form.

Returns

self

Method reset_password()

Usage

FirebaseUI$reset_password(email = NULL)

Arguments

email

Email to send reset link to, if missing looks for current logged in user's email

Details

Reset user password

Returns

self

Method get_reset()

Usage

FirebaseUI$get_reset()

Details

Get whether password reset email was successfully sent

Returns

A list of length 2 containing success a boolean indicating whether email reset was successful and response containing successful or the error.

Method send_verification_email()

Usage

FirebaseUI$send_verification_email()

Details

Send the user a verification email

Returns

self

Method get_verification_email()

Usage

FirebaseUI$get_verification_email()

Details

Get result of verification email sending procedure

Returns

A list of length 2 containing success a boolean indicating whether email verification was successfully sent and response containing successful or the error.

Method set_password()

Usage

FirebaseUI$set_password(password)

Arguments

password

The authenticated user password, the user should be prompted to enter it.

Details

Set user password

Useful to provide ability to change password.

Returns

self

Method get_password()

Usage

FirebaseUI$get_password()

Details

Get response from set_password

Returns

A list of length 2 containing success a boolean indicating whether setting password was successfully set and response containing successful as string or the error.

Method re_authenticate()

Usage

FirebaseUI$re_authenticate(password)

Arguments

password

The authenticated user password, the user should be prompted to enter it.

Details

Re-authenticate the user.

Some security-sensitive actions<U+2014>such as deleting an account, setting a primary email address, and changing a password<U+2014>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.

Method get_re_authenticated()

Usage

FirebaseUI$get_re_authenticated()

Details

Get response from re_authenticate

Returns

A list of length 2 containing success a boolean indicating whether re-authentication was successful and response containing successful as string or the error.

Method clone()

The objects of this class are cloneable with this method.

Usage

FirebaseUI$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
# NOT RUN {
library(shiny)
library(firebase)

ui <- fluidPage(
  useFirebase(), # import dependencies
  useFirebaseUI() # import UI
)

server <- function(input, output){
  f <- FirebaseUI$
    new()$ # instantiate
    set_providers( # define providers
      email = TRUE, 
      google = TRUE
    )
}

# }
# NOT RUN {
shinyApp(ui, server)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab