Hi, I bought the book Firebase Web App, my questions is ¿how can i receive the email and password externally? because if my user and pass change, I need update all the code, because the USER_EMAIL and USER_PASSWORD is a constant in the code. Thanks and Regards
.
Hola, compré el libro Firebase Web App, mi pregunta es ¿cómo puedo recibir el correo electrónico y la contraseña externamente? porque si mi usuario y mi contraseña cambian, necesito actualizar todo el código, porque USER_EMAIL y USER_PASSWORD es una constante en el código. Gracias y saludos
You are basically in a chicken and egg scenario. At some point you will need to hard code your username/password. For instance, if you want your username/password from an external system, you will need to be able to login to that system to get the username/password for Firebase. It is probably better to do it in your Arduino code and Using OTA updates.
Hi.
I’m not sure that I understood your question.
But, if I understood correctly, do you want to be able to insert the user email and password on the ESP32 without hard code?
You can create a web server with input fields where you insert the user email and password.
And only after getting those values, the ESP would connect to Firebase.
We have some tutorials with input fields.
For example:
I hope this answers your question.
Regards,
Sara
Thank you for writing me, but I was not clearer in writing it in English.
In the footer page 139 from PDF Firebase_Web_App I view a “bootstrap panel modal input” email and password for can login at firebase.
.
How can I use this data input (email and password) for send to ESP32 and replace USER_EMAIL and USER_PASS constant in our code?
Gracias por escribirme, pero no fuí mas claro en escribirlo en ingles.
En el pie de página de la página 139 de PDF Firebase_Web_App, veo un correo electrónico y una contraseña de “entrada modal del panel de arranque” para poder iniciar sesión en firebase.
.
¿Cómo puedo usar esta entrada de datos (correo electrónico y contraseña) para enviar a ESP32 y reemplazar la constante USER_EMAIL y USER_PASS en nuestro código?
Thanks Steve for writing to me, but I’m going to write my question the other way
Hi Horacio.
You can’t.
What Steve mentioned is correct.
For the ESP32 to have access to firebase it needs to connect as a user. So, it needs to “know” the authorized user’s email address and password.
If you don’t want to hard code the credentials on the ESP32, you can build a web server, as I suggested previously.
I hope this answers your question.
Regards,
Sara
Thanks Sara for your answer and Steve, I need to find out how other developers have found a way to access without OTA or change the source code with a web server or as STA for change configuration
.
I have done everything that is written in your PDF, very good job, of course any modification is my responsibility.