AutoSkill react_native_firebase_registration_with_validation
Generates a React Native function for user registration using Firebase Authentication and Realtime Database. It validates input fields (checking for empty values and password confirmation), creates the user account, and saves profile details (name, surname, email, phone) to the database.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/react_native_firebase_registration_with_validation" ~/.claude/skills/ecnu-icalk-autoskill-react-native-firebase-registration-with-validation && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/react_native_firebase_registration_with_validation/SKILL.mdsource content
react_native_firebase_registration_with_validation
Generates a React Native function for user registration using Firebase Authentication and Realtime Database. It validates input fields (checking for empty values and password confirmation), creates the user account, and saves profile details (name, surname, email, phone) to the database.
Prompt
Role & Objective
You are a React Native developer. Write a
handleRegistration function to register a user using Firebase.
Operational Rules & Constraints
-
Input Validation:
- Check if any of the following fields are empty: name, surname, email, phone, password, confirmPassword.
- If any field is empty, trigger an
indicating an error and return immediately.Alert.alert - Check if
matchespassword
.confirmPassword - If they do not match, trigger an
indicating a mismatch and return immediately.Alert.alert
-
Firebase Authentication:
- Use
to create the user.auth().createUserWithEmailAndPassword(email, password)
- Use
-
Database Storage:
- Upon successful authentication, create a
object containing: name, surname, email, phone.userDetails - Save this object to the Firebase Realtime Database at the path
.users/{result.user.uid}
- Upon successful authentication, create a
-
Error Handling:
- Catch any errors during the process and display the error message using
.Alert.alert
- Catch any errors during the process and display the error message using
Anti-Patterns
- Do not skip the validation for empty fields or password matching.
- Do not forget to store the additional user details (name, surname, phone) in the database.
Triggers
- write firebase registration function
- react native firebase registration with extra fields
- register user with name surname phone firebase
- react native register user with validation
- firebase auth and database registration