0

I am using firebase authentication with React Native an I often get an 'auth/internal error'. I started out using firebase v3 and did not migrate from v2. What does this error mean and how can I resolve it?

I replaced the API Key in my Firebase Initialize Config to match the Android API Key in my developer console as opposed to the Browser API Key. I think this works better. Can anyone confirm this?

Edit

Actually the error persists and this is the photo https://i.stack.imgur.com/WEGbO.jpg

Nithin Srinivasan
  • 485
  • 1
  • 6
  • 20
  • When you get an internal error, inspect the content of the `error.message`, it will contain the raw server response which can be more actionable. – bojeil Jul 28 '17 at 04:16
  • The error is that the Idp token is not valid. I am currently caching the firebase credential in local storage and using that to reauthenticate the user when they reopen the app since I couldn't find a way to maintain firebase sessions in react native. – Nithin Srinivasan Jul 28 '17 at 09:26
  • Sessions are persisted in asyncStorage in react-native. Are you using onAuthStateChanged listener to detect a logged in user? – bojeil Jul 28 '17 at 17:48
  • No I wasn't. So I have to use onauthstatechanged listener. To reauthenticate my user? – Nithin Srinivasan Jul 28 '17 at 17:49
  • No you need it to detect that the user is already signed in: https://stackoverflow.com/questions/37873608/how-do-i-detect-if-a-user-is-already-logged-in-firebase/37886999#37886999 – bojeil Jul 28 '17 at 17:55

0 Answers0