Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By ViniciusKruz
#59408 Hi,

Simple authentification example for Arduino IDE work 100% but if i insert the funcions of SPIFFS, authentification fail, not read the cookie:


Authentification:
Code: Select all//Check if header is present and correct
bool is_authentified(){
  Serial.println("Enter is_authentified");
  if (server.hasHeader("Cookie")){   
    Serial.print("Found cookie: ");
    String cookie = server.header("Cookie");
    Serial.println(cookie);
    [color=#FF0000]if (cookie.indexOf("ESPSESSIONID=1") != -1) {
      Serial.println("Authentification Successful");
      return true;
    }[/color]
  }
  Serial.println("Authentification Failed");
  return false; 
}


The red code not enter if activate SPIFFS:

#include <FS.h>
SPIFFS.begin();

This is a bug?

Sorry for my english.

Thanks!!