firebase / firebase/firebase-ios-sdk

[FR]: A promise that will initialize firebase (pause the code until firebase is working)

Open
#13,533 5 comments 0 reactions 0 assignees View on GitHub
api: auth type: feature request
Dominant language
C++
Stars
6.7k
Forks
1.8k
Avg merge
2d 18h
Merged PRs (30d)
75

Description

### Description

1. Before your firebase code can run, firebase always needs a few moments until it can run.

2. Mostly used is OnAuthStateChanged() which executes the code when a user is found.
However that does not work when there is no user or when the code that needs to know if there is a user starts immidiatly.
So there is always a timing problem which can be hard to solve (To use a timer for example is not how you want the code to work)

3. To have a promise like await initFirebase() that will wait until firebase is ready to be used would be fantastic.

Thank you for your time

### API Proposal

_No response_

### Firebase Product(s)

Performance

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating the Firebase Performance initialization path and existing readiness behavior, then clarify the proposed await initFirebase() API and define how completion should be verified when Firebase has and has not found a user.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios
Domain
mobile-dev, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.