firebase / firebase/firebase-js-sdk

provider.credentialFromResult(auth, result) is not a function

Open
#7,605 1 comment 0 reactions 0 assignees View on GitHub
api: auth documentation needs-attention
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

### Operating System

macOS

### Browser Version

Safari 16.5.2

### Firebase SDK Version

10.1.0

### Firebase SDK Product:

Auth

### Describe your project's tooling

index.html with source tag.

### Describe the problem

Documentation is not up to date with the api. On the following places

1. https://firebase.google.com/docs/reference/js/auth.md#example_2
2. https://firebase.google.com/docs/reference/js/auth.md#example_9
3. https://firebase.google.com/docs/reference/js/auth.md#example_10

You have the code `provider.credentialFromResult(auth, result)`. If you run this, you get the error that `credentialFromResult` is not a function, because it isn't. [credentialFromResult](https://firebase.google.com/docs/reference/js/auth.googleauthprovider.md#googleauthprovidercredentialfromresult) is a static method that only takes a user credential as a parameter.

### Steps and code to reproduce issue

Already explained.

Contributor guide

Open the contributing guide

Research direction

Review the three linked examples in the Firebase Auth JavaScript API reference and compare their credential helper calls with the linked credentialFromResult documentation. Update each outdated example to match the documented static method signature, then verify that all three examples use the current API.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authentication, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.