Open
Description
[REQUIRED] Describe your environment
- Operating System version: Ubuntu 20.10
- Browser version: Chromium 87.0.4280.88 snap
- Firebase SDK version: 8.18.0
- Firebase Product: auth emulator
[REQUIRED] Describe the problem
Steps to reproduce:
-
Configure application to connect to Firebase Auth emulator
-
Log into application using "google auth" credentials
-
Unlink "google auth" credentials from the user by calling
firebase.auth().currentUser.unlink('google.com')
- Relink "google auth" credentials to the user by calling
const googleProvider = new firebase.auth.GoogleAuthProvider()
firebase.auth().currentUser.linkWithRedirect(googleProvider)
Relevant Code:
// IMPORTANT: make sure you are connected to the emulator!!!
import firebase from 'firebase/app'
const provider = new firebase.auth.GoogleAuthProvider
// This happens out of band
auth.signInWithRedirect(provider)
// I don't think this is exceptional to me unlinking and
// relinking, but just in case...
async function unlinkAndRelink() {
await firebase.auth().currentUser.unlink('google.com')
await firebase.auth().currentUser.linkWithRedirect(provider)
}
Results
{"error":{"code":400,"message":"API key not valid. Please pass a valid API key.","errors":[{"message":"API key not valid. Please pass a valid API key.","domain":"global","reason":"badRequest"}],"status":"INVALID_ARGUMENT"}}"
Console:
auth.esm.js?b7aa:219 GET https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig?key=fake-api-key&cb=1610124371002 400