firebase / firebase/firebase-js-sdk
Firebase login with google much slower than native google login, JWT takes a long time
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 37
Description
### Describe your environment
* Operating System version: OSX
* Browser version: chrome 76.0.3809.132
* Firebase SDK version: 6.4.1
* Firebase Product: auth
I've noticed that following the [login with google guide](https://firebase.google.com/docs/auth/web/google-signin) as mentioned in the firebase docs is significantly slower to load the actual google login page than using the [login with google](https://developers.google.com/identity/sign-in/web/sign-in) and then [passing the creds to firebase](https://firebase.google.com/docs/auth/web/google-signin#advanced:-handle-the-sign-in-flow-manually)

Notice that the firebase popup shows about:blank for a good 2 seconds.
I've made a minimal reproduction to demonstrate this, (i'm using angular but it doesn't matter)
**[https://itsteknas.github.io/fierbase-login-delay-reproduction/](https://itsteknas.github.io/fierbase-login-delay-reproduction/)**
This bug is for two reasons,
1. The time it takes to load the google login in firebase is too much compared to gauth ~3-4s
2. The time it takes to get the firebase JWT after successful gauth is again too much ~2 s
The problem is only worsened by the poor connectivity while using cellular network.
You can try the demo page with some network throttling and see it for yourself.
Contributor guide
Assessment
This issue has not been assessed yet.