0

this is my first question, so let if I did something wrong, I´ll rework it.

This Issue
For accessing a FBRD protected via Security Rules, the user has to be authorized and authenticated.
Authorization: Done via setting up Security Rules -> OK
Authentication: Done via Google OAuth2 access tokens or Firebase ID tokens as per Firebase Authenticate Doku
There are several libraries I found but sadly non of them is applicable for my use-case:

  1. running on an µC
  2. support of GSM (no Wifi)

What I achieved
Posting Data via https REST to FBRD with API-KEY and SECRET. This is just an interim workaround which I want to get rid off, since SECRET should not be stored of µC source code and the user µC in this case should only have limited access as per Security Rules.

What I tried without success
Wifi Library: Firebase-ESP-Client
Example: EMail
Info: There was already a discussion on GSM. Outome was, no GSM support

My question
Has somebody solved this issue or could help in doing so? I´m not a security expert but I think APIs for token generation and exchange are needed. Or with other word how get the token exchange and needed for sign-in-email-password realized on µC?

Thanks in advance

Build Errors due to Wifi connection

Firebase Arduino Client Library for ESP8266 and ESP32/src/wcs/esp32/FB_TCP_Client.h:43:0,
Firebase Arduino Client Library for ESP8266 and ESP32/src/common.h:39,
Firebase Arduino Client Library for ESP8266 and ESP32/src/Utils.h:37,
Firebase Arduino Client Library for ESP8266 and ESP32/src/signer/Signer.h:37,
Firebase Arduino Client Library for ESP8266 and ESP32/src/Firebase.h:45,
Firebase Arduino Client Library for ESP8266 and ESP32/src/Firebase_ESP_Client.h:41,
AndyK
  • 1
  • 1
  • Can you edit your question to show the [minimal, complete/standalone code that reproduces the problem](http://stackoverflow.com/help/mcve)? – Frank van Puffelen Dec 16 '21 at 16:33
  • Hello @FrankvanPuffelen, thanks for your remark, sadly I can´t provide any sources since it is not compiling. Nevertheless I try to make it more clearer in the issue description – AndyK Dec 18 '21 at 12:23
  • What is the actual question? Do you have some code you're having difficulty with? – Jay Dec 19 '21 at 14:30
  • Hello @Jay, I do not have a solution for auth as a user, which I have created in FBRD. Therefore I need libraries or an example how to implement Auth2.0 or FB ID tokens on a µC (ESP32 in my case. In my current solution I do the auth via REST with API-KEY and DB SECRECT. In this case it is a lets say super-user. I it would be helpful I could share my code but since there no Auth2.0 or FB ID token stuff in I do not think that it would add any useful benefit. Just let me know – AndyK Dec 20 '21 at 10:29
  • SO is a coding specific site so if your question is not about a section of code, it's probably not a good question for this site. Also asking for Libraries or coding tutorials is also off topic. It would be good to familiarize yourself with what we do here - Please take a moment and review [How to ask a good question](https://stackoverflow.com/help/how-to-ask) and also take a look at the link provided by @FrankvanPuffelen in his comment above. – Jay Dec 20 '21 at 18:39
  • Hello @Jay, I´m sorry if my behavior was not compliant with this community. Honestly whenever I do have questions or I´m stuckting stack overflow provides me an answer or at least a direction in which I could go. Nevertheless if I found a solution. I will update it here, since other guys do have similar problems. BR – AndyK Dec 21 '21 at 15:33
  • Behavior is not an issue - the type of question is the issue because it's not a coding specific question. If you have a section of code causing your issue, include that in the question along with the troubleshooting and we'll take a look! – Jay Dec 21 '21 at 20:19

0 Answers0