firebase / firebase/snippets-web

wrong code

Open
#399 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
802
Forks
285
PR merge metrics
No merged PRs in 30d

Description

Github documentation page:

https://github.com/firebase/snippets-web/blob/467eaa165dcbd9b3ab15711e76fa52237ba37f8b/auth/auth-state-persistence.js#L1-L27

Firebase documentation page:

https://firebase.google.com/docs/auth/web/auth-state-persistence?hl=pt-br#web_1

**wrong imports: ❌**

```
import firebase from "firebase/app";
import "firebase/auth";
```

**correctly imports: ✅**
```
import firebase from "firebase/compat/app"; // Or the modular import
import "firebase/compat/auth"; // Or the modular import for getAuth
```

Contributor guide

Open the contributing guide

Research direction

Open auth/auth-state-persistence.js at lines 1-27 and compare it with the Firebase authentication state persistence page linked in the issue. Verify which import style the current documentation requires, update the snippet accordingly, and confirm the rendered example no longer shows the incorrect imports.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.