firebase

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirebaseLogin

func FirebaseLogin(email, password, apiKey string) (string, error)

func GetFirebaseApiKey added in v1.0.3

func GetFirebaseApiKey() string

GetFirebaseApiKey returns the Firebase API key (from Vercel API or environment)

func GetFirestoreClient

func GetFirestoreClient() (*firestore.Client, error)

func InitApp

func InitApp() *firebase.App

func SaveUserData

func SaveUserData(uid, username, provider string) error

func SignUpUser

func SignUpUser(email, password string) (*auth.UserRecord, error)

func UserEmailExists

func UserEmailExists(email string) (bool, error)

Check if a user already exists with the email

func UsernameTaken

func UsernameTaken(username string) (bool, error)

Check if username is already taken

Types

type FirebaseCredentials added in v1.0.3

type FirebaseCredentials struct {
	ServiceAccount json.RawMessage `json:"serviceAccount"`
	FirebaseApiKey string          `json:"firebaseApiKey"`
}

FirebaseCredentials holds both service account and API key

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL