R wrapper for Firebase Authentication REST API.
Designed to be used on the backend of your R applications, whether web or non-web.
{frbs}
enables you to integrate Firebase Authentication services
seamlessly into your projects, allowing for user authentication, account
management, and other authentication-related tasks.
Suitable if you need absolute full control on how you build & customize your login & registration process/pages, while still using Firebase Auth.
You can install the development version of {frbs}
like so:
remotes::install_github("kennedymwavu/frbs")
-
Create a Firebase project.
-
Grab the project’s API key and place it in your
.Renviron
asFIREBASE_API_KEY
:FIREBASE_API_KEY = Your-API-Key-Goes-Here
-
Restart your R session.
-
Connect to your frontend.
Functions in the package are named similarly to the descriptions in the
Firebase Authentication REST
API docs, and
they all have the prefix frbs_
.
These are the exported ones:
frbs_sign_up(email, password)
: Sign up user with email/password.frbs_send_email_verification(id_token)
: Send email verification.frbs_sign_in(email, password)
: Sign in a user with email & password.frbs_send_password_reset_email(email)
: Send password reset email.frbs_change_password(id_token, password)
: Change user password.frbs_update_profile(id_token, ...)
: Update user profile.frbs_delete_account(id_token)
: Delete user account.frbs_get_user_data(id_token)
: Get user data from firebase.frbs_exchange_custom_token(token)
: Exchange custom token for an ID and refresh token.frbs_exchange_refresh_token(refresh_token)
: Exchange a refresh token for an ID token.
Examples are provided here.