ESP32 Firebase: authenticating results in error with no message – but Firebase does recognize my login

  arduino, c++, esp32, firebase

I am trying to authenticate using signIn() method and example code from ESP32 Client library (the new version)

  • When I run my code I successfully connect to WiFi and also I can
    successfully CREATE new account from the ESP32 board.
  • When I then save the email/pass to the flash and restart the ESP32 or
    even right after the successful register – the function
    Firebase.authenticated() returns always False
  • I need to know if my log in or registration was successful
  • In my Firebase authentication signup with email/pass is enabled.

Also very strange thing is that in my Serial monitor fb_config.signer.signupError.message.c_str() returns an empty string:

enter image description here

Code that I am using:

void connectToFirebase(){    
  Serial.printf("Firebase Client v%snn", FIREBASE_CLIENT_VERSION);

  /* Assign the api key (required) */
  fb_config.api_key = API_KEY;

  /* Assign the RTDB URL (required) */
  fb_config.database_url = DATABASE_URL;

  If I only want to log in use this???
  // = email_name.c_str();
  //fb_auth.user.password = email_pass.c_str();

  /* Sign up */
  if (Firebase.signUp(&fb_config, &fb_auth, email_name, email_pass)){
    Serial.printf("Error occured: %sn", fb_config.signer.signupError.message.c_str());

  Firebase.begin(&fb_config, &fb_auth);  

  //IDK why this doesnt work - but it should
    Serial.println("I am authenticated");


Uncommenting or commenting this lines have no effect on the code: = email_name.c_str();
fb_auth.user.password = email_pass.c_str();

Screenshot from my Firebase authentication that my ESP32 was created and also logged in today:

enter image description here

I know my Firebase initialization was successful because I can read and write read data into the Realtime database:

enter image description here

I am using PlatformIO and this is my config file:

platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps = 
    mobizt/Firebase Arduino Client Library for ESP8266 and [email protected]^2.5.4
    bblanchon/[email protected]^6.18.5

Source: Windows Questions C++