firebase / firebase/quickstart-js

Sign in With Custom Token

Open
#464 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.4k
Forks
3.7k
Avg merge
2d 13h
Merged PRs (30d)
6

Description

Simple questions:

1. Is it possible to perform a firebase authentication using a custom token generated from a backend service? According to the official documentation, YES, but unfortunately the REALITY is different. Once you try to perform this code
```
const firebase = require('firebase');

const token = '';

const app = firebase.initializeApp({
databaseURL: "https://my-fancy-instance.firebaseio.com",
});

app.auth().signInWithCustomToken(token);
```

Then you get an error for an invalid API KEY, which leads to my 2nd question:

2. Why in the name of the holy motherboard we have a custom token authentication if we ALSO MUST set the **secret**, which is the API KEY?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.