Documentation
¶
Index ¶
- func FirebaseLogin(email, password, apiKey string) (string, error)
- func GetFirebaseApiKey() string
- func GetFirestoreClient() (*firestore.Client, error)
- func InitApp() *firebase.App
- func SaveUserData(uid, username, provider string) error
- func SignUpUser(email, password string) (*auth.UserRecord, error)
- func UserEmailExists(email string) (bool, error)
- func UsernameTaken(username string) (bool, error)
- type FirebaseCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirebaseLogin ¶
func GetFirebaseApiKey ¶ added in v1.0.3
func GetFirebaseApiKey() string
GetFirebaseApiKey returns the Firebase API key (from Vercel API or environment)
func GetFirestoreClient ¶
func SaveUserData ¶
func SignUpUser ¶
func SignUpUser(email, password string) (*auth.UserRecord, error)
func UserEmailExists ¶
Check if a user already exists with the email
func UsernameTaken ¶
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
Click to show internal directories.
Click to hide internal directories.