1
votes

I am developing a Web application and a Chrome extension with Firebase.

Authentication Flow:

  1. User logins in the web application
  2. Web application queries custom token from our self-hosted server.
  3. Web application sends the custom token to the chrome extension.
  4. The Firebase client in the chrome extension login the user with the custom token.

Now I added the Anonymous Authentication to the web application, all work well, except the isAnonymousstate is not correct at the extension side:

The user JSON in the web application side:

{
 "providerId":"firebase",
 "uid":"UgDe48GltcaIymUgoBNF6Yg231B3",
 "displayName":null,
 "email":null,
 "photoURL":null,
 "isAnonymous":true
}

The user JSON in the extension side:

{
 "providerId":"firebase",
 "uid":"UgDe48GltcaIymUgoBNF6Yg231B3",
 "displayName":null,
 "email":null,
 "photoURL":null,
 "isAnonymous":false
}
1

1 Answers

1
votes

Custom authenticated users are not considered anonymous. isAnonymous will be false for such users. Only users signed in with signInAnonymously will have the isAnonymous flag set to true.