firebase / firebase/firebase-js-sdk

API is missing implementations of AuthCredential

Open
#120 4 comments 1 reaction 0 assignees View on GitHub
api: auth documentation feature request internal-bug-filed
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

### Environment

* Operating System version: any
* Firebase SDK version: 4.1.3
* Firebase Product: auth

### Problem

The API reference is missing details about implementations of the [`AuthCredential`](https://firebase.google.com/docs/reference/js/firebase.auth.AuthCredential) interface. There is an implementation specific to each auth provider. The attribute `accessToken`, and for Twitter also the attribute `secret` of the `AuthCredential` needs to be accessed but it is not documented in the API. The only place where it is mentioned is in the example code, for example in [GithubAuthProvider](https://firebase.google.com/docs/reference/js/firebase.auth.GithubAuthProvider):

```JavaScript
// This gives you a GitHub Access Token.
var token = result.credential.accessToken;
```

The reason I'm opening this issue is because we need to rely on the official JS API for the implementation on the [Dart side of Firebase](https://github.com/firebase/firebase-dart) to be able to resolve [this issue](https://github.com/firebase/firebase-dart/issues/118).

Contributor guide

Open the contributing guide

Research direction

Start with the AuthCredential API reference and the provider references, including GithubAuthProvider, to compare the documented interface with the provider-specific implementations. Document accessToken for each implementation and Twitter's secret attribute; the API reference is complete when these properties are described rather than only shown in examples.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.