MethodsSign Up | Fire Snippets Docs
Sign Up
Handles user sign-up by attaching an onclick event listener to a specified button.
signUp(snippetId)
Description
Handles user sign-up by attaching an onclick event listener to a specified button. When the button is clicked, it creates a new user using Firebase Auth and saves additional user data to Firestore.
Method Signature
Parameters
- snippetId: (string) The ID of the sign-up snippet configuration.
Returns
- Promise: Resolves with a
userCredential
object upon successful sign-up, or rejects with an error.
Usage Example
HTML Elements Required
Ensure your HTML includes the following elements with IDs matching those specified in your snippet configuration:
Was this helpful?