
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
firebase-auth-sdk
Advanced tools
A lightweight TypeScript wrapper for Firebase Authentication REST API. This package provides a simple interface to interact with Firebase Authentication services without the full Firebase SDK dependency.
A lightweight TypeScript wrapper for Firebase Authentication REST API. This package provides a simple interface to interact with Firebase Authentication services without the full Firebase SDK dependency.
npm install firebase-auth-sdk
import { FirebaseAuthSDK } from "firebase-auth-sdk";
const auth = new FirebaseAuthSDK("your-api-key");
const signUp = async () => {
try {
const user = await auth.signUp("user@example.com", "password123");
console.log("User created:", user.localId);
} catch (error) {
console.error("Sign up failed:", error.message);
}
};
const signIn = async () => {
try {
const user = await auth.signIn("user@example.com", "password123");
console.log("Signed in:", user.idToken);
} catch (error) {
console.error("Sign in failed:", error.message);
}
};
const sendVerification = async (idToken: string) => {
try {
await auth.sendEmailVerification(idToken);
console.log("Verification email sent");
} catch (error) {
console.error("Failed to send verification:", error.message);
}
};
// When user clicks verification link, verify the OOB code
const verifyEmail = async (oobCode: string) => {
try {
await auth.confirmEmailVerification(oobCode);
console.log("Email verified successfully");
} catch (error) {
console.error("Email verification failed:", error.message);
}
};
const resetPassword = async () => {
try {
// Send reset email
await auth.sendPasswordReset("user@example.com");
console.log("Password reset email sent");
// When user clicks reset link, verify the OOB code and set new password
const oobCode = "code-from-email";
await auth.verifyPasswordReset(oobCode, "newPassword123");
console.log("Password reset successful");
} catch (error) {
console.error("Password reset failed:", error.message);
}
};
The SDK throws HttpError
for API-related errors, which includes:
The package includes TypeScript definitions for all responses from Firebase Authentication API, including:
FirebaseUser
FirebaseSignupResponse
FirebaseRefreshTokenResponse
FirebaseUpdateProfileResponse
LookupInfoResponse
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
A lightweight TypeScript wrapper for Firebase Authentication REST API. This package provides a simple interface to interact with Firebase Authentication services without the full Firebase SDK dependency.
We found that firebase-auth-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.